Open TJackwood-Jasper opened 2 years ago
One outstanding issue that may come from this change: On a "paste" event, Quill fires a text-change
event that is processed by _quillObserver
, however the current selection at the time is null, i.e. this.quill.getSelection() === null
.
Because of this, we CLEAR the cursor awareness on a paste event, even though for the user that pasted the content, their cursor ends up at the end of the content they just pasted (due to a 3rd silent selection-change
event in this scenario, specifically).
Personally I think this is a fine interaction, since the location of the cursor at the moment after a paste action isn't that particularly relevant, and the awareness is immediately updated and handled correctly on the next action anyways. I don't see a good way of determining whether or not a text-change
action comes from a paste, or how to tell the difference between a selection-change
event after a paste vs. any other selection-change
event.
See the related GitHub issue for a detailed explanation of the issue.