-
Notifications
You must be signed in to change notification settings - Fork 65
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 cursor selection event on the web #459
Conversation
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.
Code LGTM, tested example app and it didn't break anything.
LMK if you want me to test it in E/App as well 😄
E/App bug: Cursor position is wrong when starting typing a message when input isn't focused Screen.Recording.2024-08-23.at.16.18.04.mov |
The above bug has been fixed. @BartoszGrajdek can you review this PR again, please 🙏 |
Details
This PR contain follow up fixes to the bugs reported in E/App under the Live Markdown refactor PR. It changes and simplifies the selection event logic, so all cases when user selects the text are caught. To achieve this we had to remove standard
selectionStart
andselectionEnd
props and replace them with customselection.start
andselection.end
. SettingselectionStart
andselectionEnd
values breaks the nativeonSelect
event handlerRelated Issues
GH_LINK
Manual Tests
Cut
Linked PRs
Expensify/App#45150