-
Notifications
You must be signed in to change notification settings - Fork 3k
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 composer selection is at start after when copying link to a message #47596
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 |
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.
This could not be solved yet. Apart from that LGTM!
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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