Fix ios and msafari to scroll text of edit message to bottom when click edit comment#30857
Fix ios and msafari to scroll text of edit message to bottom when click edit comment#30857tylerkaraszewski merged 2 commits intoExpensify:mainfrom
Conversation
…ck edit comment Signed-off-by: Tsaqif <tsaiinkwa@yahoo.com>
|
@narefyev91 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
|
||
| if (textInputRef.current) { | ||
| textInputRef.current.focus(); | ||
| } |
There was a problem hiding this comment.
I am putting the focus here because if I put it in the mount of ReportActionItemMessageEdit, there will be a regression about:
If user leave the edited text message without closing it then he visit other report and comeback to the first report, the report action list will scroll to the unclosed text input of the edited message.
There was a problem hiding this comment.
Hey @tsa321 - i think it's not a regression - if user has opened edit message - and move back and again to the same report - we should focus editing message box
There was a problem hiding this comment.
scroll_to_edit_d.mp4
@narefyev91 Just to confirm, this is expected right? I will edit the code...
There was a problem hiding this comment.
@tsa321 let me know - when you will be remove those lines of code - i will start testing in parallel
There was a problem hiding this comment.
Please wait, maybe in one or two hours I will move those lines to mount of the ReportActionEditMessage.
| }); | ||
| return prevDraft; | ||
| }); | ||
| textInputRef.current.scrollTop = textInputRef.current.scrollHeight; |
There was a problem hiding this comment.
this line is specifically for ios-msafari, so I am putting it here.
Reviewer Checklist
Screenshots/VideosWebweb.1.mp4Mobile Web - Chromeandroid-web.1.mp4Mobile Web - Safariios-web.mp4Desktopdesktop.mp4iOSios.mp4Androidandroid.mp4 |
narefyev91
left a comment
There was a problem hiding this comment.
Just need to remove lines from this file.
LGTM!
🎀 👀 🎀 C+ reviewed
Signed-off-by: Tsaqif <tsaiinkwa@yahoo.com>
| keyboardShouldPersistTaps="handled" | ||
| onLayout={onLayoutInner} | ||
| onScroll={trackVerticalScrolling} | ||
| onScrollToIndexFailed={() => {}} |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/tylerkaraszewski in version: 1.3.96-0 🚀
|
|
This PR introduced this regression. |
|
@narefyev91 since this PR introduce regression on andorid, Can I move the logic into IOS or safari specific platform code? |
Yes let's separate fix only for platforms in which we have issues |
|
Here is the follow up PR: #31041 |
|
Issue reproducible on latest build 1.3.97-2 RPReplay_Final1699517579.MP4 |
|
@narefyev91 Looks like my proposal for IOS native doesn't always works reliably, What should we do? |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.96-15 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.97-7 🚀
|
|
Was not able to reproduce issue mentioned in 1.3.97-2. Tested on latest main Screen.Recording.2023-11-13.at.13.55.05.mov |

Details
Fixed Issues
$ #29782
PROPOSAL: #29782 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.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-native_d.mp4
Android: mWeb Chrome
android-mweb_d.mp4
iOS: Native
ios-native_d.mp4
iOS: mWeb Safari
ios-msfari_d.mp4
MacOS: Chrome / Safari
macos-web_d.mp4
MacOS: Desktop
macos-desktop_d.mp4