-
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
fix: flush selection change on before input #4669
fix: flush selection change on before input #4669
Conversation
🦋 Changeset detectedLatest commit: 79928a9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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.
@BitPhinix thanks, overall this looks good! Our integration test for triple-clicking seems to be failing. These tests are pretty flaky in general, but if you could give a quick test to make sure that this change doesn't break triple-click behavior that would be greatly appreciated.
Just checked, seems to be working just fine. I think it's just flaky ci. |
@BitPhinix did you by chance check this on macOS? I'm having intermittent failures with the IME keyboard not showing up until I defocus slate. Trying to track down if it's this change or #4671, but I'm guessing it's this one unfortunately. |
Could you send a video of the issue? I tried writing with several IMEs (Japanese etc.) on mac and it seemed to be working just fine |
I really don't know what to say, yesterday I could not get the IME to pull up reliably on slate documents, today things are fine. No reboot, etc. So I'm guessing things are fine. |
Description
Fixes a regression introduced by #4132.
Some IMEs/Chrome extensions like e.g. Grammarly set the selection immediately before triggering a
beforeinput
expecting the change to be applied to the immediately before set selection. Defering this selection update causes the change to be applied to an outdated selection.Issue
Fixes: #4579
Example
Before:
After:
Checks
yarn test
.yarn lint
. (Fix errors withyarn fix
.)yarn start
.)yarn changeset add
.)