parchment icon indicating copy to clipboard operation
parchment copied to clipboard

contenteditable false still allows blocks to be merged.

Open npcole opened this issue 1 year ago • 1 comments

If creating a custom blot inheriting from Block and setting:

Unexpected result

node.setAttribute('contenteditable', 'false');

Quill correctly prevents the user from editing the text in that block.

However, if the block is followed immediately by a block that can be edited, and the user puts the cursor before the first character of that block and presses delete, the editable block is merged with the contenteditable === false block.

This makes the contents of both original blocks impossible to edit.

Expected result

Blocks with contenteditable set to false should not be merged with other blocks as a result of user editing actions.

npcole avatar Dec 24 '24 23:12 npcole

I've tried debugging this, but I can't find where the merge code is actually handled, so I am not at all sure how to correct the problem.

npcole avatar Dec 24 '24 23:12 npcole