Open jmiserez opened 5 years ago
@casualuser Any reason this is not tagged as a bug like the other issues? It is in fact a simple bug.
This also happens when changing Paragraph Format while all plugins are enabled. It appears that the plugins.js file is using .includes
in a lot of places. For all of these places, fixing it for IE would be the same thing as described in OP.
This is easily replicable here: https://www.froala.com/wysiwyg-editor/examples/full-featured
If you want to, you can add this polyfill to your code to make IE11 support String.includes(). That way you do not need to wait for Froala to fix the problem.
If you want to, you can add this polyfill to your code to make IE11 support String.includes(). That way you do not need to wait for Froala to fix the problem.
Is there at least approximate/rough estimate when the bug will be fixed?
If you want to, you can add this polyfill to your code to make IE11 support String.includes(). That way you do not need to wait for Froala to fix the problem.
Is there at least approximate/rough estimate when the bug will be fixed?
I wish! I am not a developer of Froala 😄
Expected behavior.
Froala should not crash on IE 11.
Actual behavior.
String.includes is not defined in IE: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
The code in question is at line 20923:
if (editor.codeBeautifier && !html.includes('fr-embedly')) {
which means Froala throws an exception:
Fix The fix is to change the code as follows:
if (editor.codeBeautifier && html.indexOf('fr-embedly') >= 0) {
Steps to reproduce the problem.
Switch to code view on IE 11, with some content loaded.
Editor version.
3.0.5
OS.
Windows 10 Enterprise 1903 18362.329
Browser.
IE 11 (11.295.18362.0, Update version 11.0.140)