-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
feat: add prop enableSelectionOp and onDOMSelectionChangeThrottleTime #5772
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: acda47a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement and thanks for the explanation.
I don't see an easy way to write an automated test for this, so I'll let that pass for now.
Could you please add a changeset and then I'll land it shortly?
Description
the issue of the anchor, it was discovered that the function for setting the anchor was filtered out during
throttle
. Currently, the default value for this is 100 milliseconds. If it is changed to 0 milliseconds, this problem can be solved.As for the issue of selection, it can be considered to add a
new type
in the operation nameenableSelectionOp
. This type can be used to determine whether the selection of the collaborator needs to be applied to the co-collaborator.This pull request mainly adds the passing of two parameters to solve this issue if developer want to resolve the problem like me. and It will not interfere with the original logic.
Finally, the achieved effect is as follows. It can be seen that both the selection and the anchor are as expected.
Issue
fix #5771
Example
after.mp4