Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue #14] Prevent _quillObserver from updating awareness states on silent Quill events #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TJackwood-Jasper
Copy link

See the related GitHub issue for a detailed explanation of the issue.

@TJackwood-Jasper
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant