quill icon indicating copy to clipboard operation
quill copied to clipboard

Range Index bug at the first character/blot of each line

Open Miloage opened this issue 1 year ago • 2 comments

After the input of the first character in each line, the range index did not change, failing to trigger the “selection-change” event. If the first content is Embed blot, there is also such a problem.
As shown in Figure 2, after a line break input, there is only a “text-change” event and no “selection-change” event. image

image

Miloage avatar Jul 18 '24 02:07 Miloage

explain. If you want to listen to selection-change. You need to use editor-change event

zzxming avatar Jul 18 '24 10:07 zzxming

I don't necessarily need to listen to selection-change event, but when I input the first character, I get an incorrect range index. getSelection() function sometimes cannot get the correct cursor position index, such as when entering the first character at the beginning of each line or when the cursor is focused immediately after the Blot element.

Miloage avatar Jul 19 '24 02:07 Miloage