Skip to content
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 onSelectionChange event called twice with different payload on iOS for multiline #192

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

tomekzaw
Copy link
Collaborator

@tomekzaw tomekzaw commented Feb 15, 2024

See RCA in #185 (comment)

Details

Screen.Recording.2024-02-15.at.10.57.28.mov

Related Issues

Fixes #185.

Manual Tests

Linked PRs

Copy link
Collaborator

@robertKozik robertKozik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good - there is no more excess event on my end.

I saw that you pinpoint the root cause to the swizzled updeteLocalData method - as I recall we implemented it to have correct attributed string during the string measurement. Maybe it's worth to consider finding another workaround to get RCTBaseTextInputShadowView::measurableAttributedText work correctly with markdown attributedString as the enhancment follow-up? What do you think?

@tomekzaw
Copy link
Collaborator Author

@tomekzaw
Copy link
Collaborator Author

Maybe it's worth to consider finding another workaround to get RCTBaseTextInputShadowView::measurableAttributedText work correctly with markdown attributedString as the enhancment follow-up?

Yes, that's definitely worth exploring. Let's merge this PR in its current shape now and investigate this topic soon.

@tomekzaw tomekzaw changed the title Fix onSelectionChange event called twice with diferent payload on iOS for multiline Fix onSelectionChange event called twice with different payload on iOS for multiline Feb 22, 2024
@tomekzaw tomekzaw merged commit 2c6a7b4 into main Feb 22, 2024
2 checks passed
@tomekzaw tomekzaw deleted the @tomekzaw/fix-ios-duplicate-on-selection-change-event branch February 22, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

onSelectionChange event called twice with different payload on iOS for multiline
2 participants