froala / wysiwyg-editor

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

Failed to set the 'outerHTML' property on 'Element': This element has no parent node. #4048

Open felskov opened 4 years ago

felskov commented 4 years ago

We're seeing reports of runtime errors when running FE.Bootstrap.underline on user devices, throwing "Failed to set the 'outerHTML' property on 'Element': This element has no parent node.". We haven't been able to reproduce the error ourselves, but the call stack appears to be:

Error: Failed to set the 'outerHTML' property on 'Element': This element has no parent node.
    at _processNodeRemove (webpack:///./js/froala_editor.js?:4892:38)
    at _processNodeRemove (webpack:///./js/froala_editor.js?:4903:31)
    at remove (webpack:///./js/froala_editor.js?:4955:7)
    at Object.toggle (webpack:///./js/froala_editor.js?:5025:9)
    at _execCommand (webpack:///./js/froala_editor.js?:2591:21)
    at FE.Bootstrap.underline (webpack:///./js/froala_editor.js?:2413:9)
    at Object.exec (webpack:///./js/froala_editor.js?:2574:20)
    at exec (webpack:///./js/froala_editor.js?:13290:72)
    at _commandButtonClick (webpack:///./js/froala_editor.js?:13298:7)
    at click (webpack:///./js/froala_editor.js?:13330:11)

In the past 7 days we've had around 10 occurrences of this error reported, it seems to happen exclusively in Chrome v85.

Editor version.

3.1.0

OS.

Windows

Browser.

Chrome v85

arturpakula commented 3 years ago

I have the same problem when I'm trying to save the selection in blur event and then resotre the selection and insert HTML into editor. I use this method to save the state: editor.selection.save(); and then editor.selection.restore(); to restore the state.

When I save a state inside onModelChange method issue not appears and I'm able to insert a value into editor using editor.html.insert(value); But after calling editor.selection.save(); inside onModelChange I'm no longer able to save the current editor content in a parent component because the Froala onModelChange is no more triggered.

I`m using React.

Editor version. 3.2.1-1

OS. Windows

Browser. Chrome v90.0.4430.85

rodricksryan commented 3 years ago

Facing a similar issue, does anyone have any update on this?

akshay-developer-2021 commented 3 years ago

Facing the same issue in Version 4.0.6 as well.

dashtaki commented 1 year ago

Same for the V. 4.0.19 :/