-
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: revert the functionality to restore cursor in value update hook #376
fix: revert the functionality to restore cursor in value update hook #376
Conversation
- revert the use of contentSelection to restore cursor pos during text update to cursor jumping around funny since contentSelection ref value can get outdated. - create func to restore cursor in the ref object Signed-off-by: dominictb <[email protected]>
Issue: Expensify/App#43312 android-bug-18.mp4Issue: Expensify/App#43310 android-bug-28.mp4Issue: Expensify/App#43332 androidb3.webm |
@BartoszGrajdek @Skalakid this should fix #341 (comment) as well |
Signed-off-by: dominictb <[email protected]>
Issue: #341 (comment) and Expensify/App#41137 (comment) android18.mp4 |
Signed-off-by: dominictb <[email protected]>
Signed-off-by: dominictb <[email protected]>
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.
@dominictb I see this PR introduces some custom API functions on the web implementation. The idea behind the Live Markdown Input is to make its interface nearly identical to the native TextInput
component so people can just replace it. Adding custom API need deeper investigation and planning. If we decide to make something new it would be great to add it on iOS and Android too.
Thank you for your changes, however I think we should try solving the issue with a bit different logic. Have you tried using the currently available features of Live Markdown to fix it on the E/App side? If yes, I think you can try fixing this issue by just changing handlePaste
event logic in MarkdownTextInput.web.tsx
Alright so here's what we're going to do now: We'll revert this PR since a fix for the regression I've mentioned was reverted here. You'll have to make 1 PR with all of these changes and we will do our best to help you along the way with the implementation since it looks like this is a tricky bug. Our goal is to keep |
Signed-off-by: dominictb <[email protected]>
@BartoszGrajdek it seems like I couldn't reproduce this Expensify/App#41137 (comment) on It seems like after updating the parser version in So after revert the |
@Skalakid for u to review the PR and the comment above. I have updated with latest details |
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.
LGTM, thanks for investigation. We will close @BartoszGrajdek's PR with the revert
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.
We're basically restoring how it worked before except for setBaseAndExtent
so it looks solid to me. I also like the idea of handling the bug in E/App itself
Details
Related Issues
RCA: Expensify/App#43312 (comment)
Solution: Expensify/App#41137 (comment)
Manual Tests
Linked PRs