Disable the focus trap for report page context menu - #15375
Conversation
|
@chiragsalian @eVoloshchak One of you needs to 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] |
|
@eVoloshchak I've gone through this again and I think that removing |
|
@allroundexperts, good catch! |
Awesome. I've updated the PR. |
|
@allroundexperts, looks like you need to merge with |
@eVoloshchak Fixed. |
…econdaryIntegration component
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-02-23.at.18.57.33.movMobile Web - ChromeScreen_Recording_20230223-190101_Chrome.mp4Mobile Web - SafariScreen.Recording.2023-02-23.at.18.56.41.movDesktopScreen.Recording.2023-02-23.at.18.58.45.moviOSScreen.Recording.2023-02-23.at.18.51.51.movAndroidScreen_Recording_20230223-190014_New.Expensify.mp4 |
|
@allroundexperts, you need to check off every checkbox in the checklist. |
@eVoloshchak What screen should I show on mobile? Since there is no right click there, what should I show there? |
You can long-press on a message to trigger the context menu. I've uploaded an iOS video here |
Got it. Thank you. I'll upload these 👍 |
|
@eVoloshchak I've added the missing recordings. |
eVoloshchak
left a comment
There was a problem hiding this comment.
LGTM
cc: @chiragsalian
Performance Comparison Report 📊Significant Changes To DurationThere are no entries Meaningless Changes To DurationShow entries
Show details
|
|
🚀 Deployed to staging by https://github.com/Luke9389 in version: 1.2.77-0 🚀
|
|
🚀 Deployed to staging by https://github.com/Luke9389 in version: 1.2.77-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.2.77-4 🚀
|
| if (this.props.withoutFocusOnSecondaryInteraction && this.pressableRef) { | ||
| this.pressableRef.blur(); | ||
| } |
There was a problem hiding this comment.
Hey everyone , this change caused a regression in #17868. In Safari, when copying part of a multiline message, the entire message is copied. The issue was resolved by changing the order from blurring -> onSecondaryInteraction to onSecondaryInteraction -> blurring.

Details
This PR fixes the issue where focus was being restored back to the message once the context menu closed. It disables this focus trap by blurring the element immediately after right click.
Fixed Issues
$ #14329
PROPOSAL: #14329 (comment)
Tests
Go to any chat
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)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.Screenshots/Videos
Web
Screen.Recording.2023-02-23.at.2.48.13.AM.mov
Desktop
Screen.Recording.2023-02-23.at.2.44.59.AM.mov
iOS
Screen.Recording.2023-02-23.at.10.42.22.PM.mov
Android
Screen.Recording.2023-02-23.at.10.49.39.PM.mov
iOS Safari
Screen.Recording.2023-02-24.at.3.09.43.AM.mov
Android Chrome
Screen.Recording.2023-02-24.at.3.08.34.AM.mov