-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
Hi,
my user just found out interesting bug.
editorSetStyle method calls condition selection.rangeCount > 0
, then else
condition is matched calls
range.surroundContents(element);
which gives exception:
InvalidStateError: Failed to execute 'surroundContents' on 'Range': The Range has partially selected a non-Text node.
HTML to simulate:
<p contenteditable="true" spellcheckker="false">some text: 8<span style="font-weight: bold;">9 points</span> some text</p>
On selecting text "89 points" and applying Bold exception is thrown.
Metadata
Metadata
Assignees
Labels
No labels