froala / wysiwyg-editor

The next generation Javascript WYSIWYG HTML Editor.
https://www.froala.com/wysiwyg-editor
Other
5.28k stars 673 forks source link

Editor in IE11 throws error on applying inline styles on content with nested spans #4154

Closed weimingw closed 2 years ago

weimingw commented 3 years ago

An error is thrown in IE11 when applying inline styles when there are nested spans. This is causing problems with our integration, because editor content can come from an outside source, which can apply spans in a nested format.

Steps to reproduce the problem.

See a live example here: https://codepen.io/weimingw/pen/oNzKGoj Codepen no longer supports editing in IE11, but you can get a read-only version here: https://cdpn.io/weimingw/debug/oNzKGoj/dGkXWjdnEPDA

  1. In IE11, have editor content that has nested spans. For example: <p style="text-align: left"><span style="font-family: Arial;"><span style="background-color: rgb(255, 255, 255)"><span style="color: rgb(0, 0, 0); font-size: 26pt">Lorem ipsum hello world</span></span></span></p>
  2. Apply inline styling like text color
Expected behavior.

No JS errors thrown

Actual behavior.

Error thrown: SCRIPT5007: Unable to get property 'indexOf' of undefined or null reference froala_editor.pkgd.min.js (7,79490)

Editor version.

v3.2.6

OS.

Windows 10

Browser.

IE11

Recording.

https://user-images.githubusercontent.com/7664881/105893464-f9dbe300-5fc7-11eb-838c-47d9b3a192dd.mp4

MeghashreeAP commented 2 years ago

Thanks for your feedback. This issue is not reproducible or have been found to be fixed on the latest Froala release v4.0.8. Can you please upgrade and check?

ilyaskarim commented 2 years ago

This issue is not reproducible or has been fixed on the latest Froala release v4.0.12.