froala / wysiwyg-editor

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

Failed to execute 'setStart' on 'Range': parameter 1 is not of type 'Node'. #4017

Open alexvcasillas opened 4 years ago

alexvcasillas commented 4 years ago
Expected behavior.

When I use cmd+ keys or toolbar buttons I expect them to be working.

Actual behavior.

Sometimes, when I use cmd+ I get the following error:

froala_editor.min.js:7 Uncaught TypeError: Failed to execute 'setStart' on 'Range': parameter 1 is not of type 'Node'.
    at r (froala_editor.min.js:7)
    at Object.i [as toggle] (froala_editor.min.js:7)
    at e (froala_editor.min.js:7)
    at b.Bootstrap.bold (froala_editor.min.js:7)
    at Object.n [as exec] (froala_editor.min.js:7)
    at Object.i [as exec] (froala_editor.min.js:7)
    at b.Bootstrap.<anonymous> (froala_editor.min.js:7)
    at Object.m [as trigger] (froala_editor.min.js:7)
    at b.Bootstrap.e (froala_editor.min.js:7)
    at m (froala_editor.min.js:7)
    at HTMLDivElement.<anonymous> (froala_editor.min.js:7)
    at HTMLDivElement.<anonymous> (froala_editor.min.js:7)
Steps to reproduce the problem.

Select a text, then use cmd+ or the toolbar to customize an element, I've tried predefined inline styles like bold, italic, underline, etc...

Editor version.

3.2.1

OS.

MacOS Catalina 10.15.6

Browser.

Google Chrome Version 84.0.4147.135 (Official Build) (64 bits)

Recording.

Cannot add a recording due to privacy

vilbergs commented 4 years ago

This is filling up my error log too. If this is non-critical It would be great if this was handled...

Thorry84 commented 3 years ago

I've traced this to the editor.format.remove function, would be nice if it were fixed.

GraemeFulton commented 3 years ago

happens for me too, also when I manually toggle bold and italic with a button hooked up to froala commands:

editor.commands.bold();
editor.commands.italic();