Fix composer selection is at start after when copying link to a message#47596
Conversation
|
A few notes:
ios.mweb.mp4I tried to remove any code from our app that focus on the composer (including focusComposerWithDelay) and the focus still happens after the modal is closed. So, my guess is that it could be the default behavior of iOS Safari that internally focus the text input. On Android, opening the context menu will blur the composer, so I can't repro it here. I think we should find a solution to make sure a text input is blurred when a modal is shown. This previously worked fine but was broken once we used a custom focus trap for our modal.
Also, opening the context menu doesn't blur the composer on native. I still record it for native by following the test step provided above. |
In the video, the cursor in the composer moves to the start of the text after clicking |
|
Reviewer Checklist
Screenshots/VideosAndroid: NativecomposerAndroid.mp4Android: mWeb ChromecomposerAndroidmWeb.mp4iOS: NativecomposeriOS.mp4iOS: mWeb SafaricomposeriOSmWeb.mp4MacOS: Chrome / SafaricomposerChrome.mp4MacOS: DesktopcomposerDesktop.mp4 |
|
So if I understand it correctly, the original bug of the the composer selection moving to the start of the message when copying a link to a message still exists on iOS both native and Safari? But the issue is fixed on the other platforms with this PR? |
It still exists on iOS only with the steps outlined here |
Cool, thanks for clarifying! I think we can move forward with this PR as is since it fixes the issue on all platforms except iOS. Then, we can continue working on a solution for iOS in the issue. We can increase the bounty to reflect the increased complexity of this issue. Thoughts, @bernhardoj ? |
|
Okay, nice! Thanks for clarifying |
|
✋ 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/MariaHCD in version: 9.0.23-0 🚀
|
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 9.0.23-0 🚀
|
Details
When we copy link a message, the app will refocus to the composer, but the cursor is at the start of the message. This PR fixes it.
Fixed Issues
$ #46095
PROPOSAL: #46095 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4