Repository navigation
Conversation
Forward scrollViewDidScroll to the original text input delegate so App receives the composer's scroll offset and keeps suggestions above the visible caret.
1 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
In Expensify App on iOS native, the suggestion popup moves downward and can eventually disappear off-screen as more text is added after the composer reaches its maximum height.
The input scrolls internally, but
MarkdownBackedTextInputDelegatereplaces React Native's original text-input delegate without forwardingscrollViewDidScroll. This prevents React Native from delivering the updated scroll offset throughonScroll. App then positions suggestions without accounting for the text that has scrolled out of view.This change forwards
scrollViewDidScrollto the original delegate when it supports the callback. App can then use the actual scroll offset to position suggestions above the visible caret. No text-layout or popup-positioning calculations are changed.Fixed Issues
$ #105753
PROPOSAL:
Tests
:smilon the first line.:smiland type enough text to reach approximately six wrapped lines, or until the composer stops growing.:smilat the end after leaving a space.:smil, add more text to reach approximately eight to ten wrapped lines, and type:smilagain. Verify that the popup does not drift downward as the text scrolls internally.Offline tests
Same as Test
QA Steps
Same as Test
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS-scroll-offset-forwarding-fix.mov
iOS: mWeb Safari
MacOS: Chrome / Safari