-
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
Revert "Do NOT use exact match when updating dom selection" #4627
Revert "Do NOT use exact match when updating dom selection" #4627
Conversation
The change to `exactMatch: false` in ianstormtaylor#4304 was intended to fix ianstormtaylor#4293, a bug where "backwards typing" happened in nested editors. But this change has introduced at least two new bugs: - ianstormtaylor#4601 - ianstormtaylor#4626 These are (IMO) worse than the original "backwards typing" bug. From discussion in ianstormtaylor#4304, the true underlying bug is in ReactEditor.toSlateRange. I'll attempt to fix this underlying bug instead.
🦋 Changeset detectedLatest commit: 9d5a5ab 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 |
Amazing work @jameshfisher ! I'm wondering, do you think this work may relate to #4602 which also involved the cursor jumping to the wrong position, although this appears to be platform-specific to Android? |
@robin-macpherson thanks although all I did was revert previous work 😅 I can't say much about #4602, although my first question would be: does your Android bug still happen with slate-react@0.68.1 and above? If so, it's probably a separate bug ... |
@jameshfisher ah, apologies for not fully understanding that 🤦🏻♂️ I just got the results from our user who does Android testing for us and it appears the bug does indeed still happen. I'll keep digging around, thanks for replying here! |
Description
The change to
exactMatch: false
in #4304 was intended to fix #4293, a bug where "backwards typing" happened in nested editors.But this change has introduced at least two new bugs:
These are (IMO) worse than the original "backwards typing" bug.
Issue
Context
From discussion in #4304, the true underlying bug is in
ReactEditor.toSlateRange
. I'll attempt to fix this underlying bug instead.Checks
yarn test
.yarn lint
. (Fix errors withyarn fix
.)yarn start
.)yarn changeset add
.)