Fix app refocuses on compose box even when RHN is open if we right click on emoji reaction and click on user#22107
Conversation
|
@allroundexperts 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] |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-07-04.at.4.30.25.PM.movMobile Web - ChromeScreen.Recording.2023-07-04.at.4.53.31.PM.movMobile Web - SafariScreen.Recording.2023-07-04.at.4.52.44.PM.movDesktopScreen.Recording.2023-07-04.at.4.32.05.PM.moviOSScreen.Recording.2023-07-04.at.4.55.29.PM.movAndroidScreen.Recording.2023-07-04.at.4.56.11.PM.mov |
|
@hoangzinh The composer does not get refocused if you don't open the RHN and just close the menu. I think this is a bug. Screen.Recording.2023-07-04.at.3.08.06.PM.mov |
In your recording video above, that's a left click, so left click or touch will focus back to composer if we close/cancel it. In this case, we right click. I think it's align when we right click on the report action => it opens the context menu, but when we click outside, it doesn't focus to composer. |
You're actually correct on this. Thanks for the explanation! |
|
@hoangzinh I'm getting this in-consistent behaviour between iOS web and android web. Can you check? Screen.Recording.2023-07-04.at.4.52.44.PM.movScreen.Recording.2023-07-04.at.4.53.31.PM.mov |
|
Update: I verified that this also happens on staging. @hoangzinh Can you confirm as well? |
Yes, I can confirm as well. That's why I have to proposal separate Tests in mweb/native app. Because I'm unsure which one is correct or is it a known issue. |
Can you create a bug report for this in Slack if it does not already exist? |
allroundexperts
left a comment
There was a problem hiding this comment.
Looks good to me. Couple of in-consistencies found on mobile web, which we've verified, are happening on staging as well. @hoangzinh will create bug report.
| onMouseDown={(e) => e.preventDefault()} | ||
| onMouseDown={(e) => { | ||
| // Allow text input blur when emoji reaction is right clicked | ||
| if (e && e.button === 2) { |
There was a problem hiding this comment.
@hoangzinh NAB: Can you point me to the documentation of e.button property? My understanding was that we'd be using e.nativeEvent.which prop.
There was a problem hiding this comment.
Yeah, e.which is deprecated. So I use e.button which is also popular used https://caniuse.com/mdn-api_mouseevent_buttons. I also recorded in both Chrome and Safari and attach in the PR description
There was a problem hiding this comment.
Excellent. Thank you!
|
✋ 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/madmax330 in version: 1.3.37-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.37-7 🚀
|


Details
Fixed Issues
$ #21526
PROPOSAL: #21526 (comment)
Tests
On Web/Desktop
On mWeb/Native apps
Offline tests
The fix is not related to network
QA Steps
Same as Tests
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
Web
Chrome:
https://github.com/Expensify/App/assets/9639873/9c585a80-f6aa-477d-bebb-d35bdf223d2d
Safari:
Screen.Recording.2023-07-03.at.21.07.31.-.web.safari.mov
Mobile Web - Chrome
Screen.Recording.2023-07-03.at.20.39.32.-.android.chrome.mov
Mobile Web - Safari
Screen.Recording.2023-07-03.at.20.58.50.-.ios.safari.mov
Desktop
Screen.Recording.2023-07-03.at.20.38.02.-.desktop.mov
iOS
Screen.Recording.2023-07-03.at.20.58.18.-.ios.mov
Android
Screen.Recording.2023-07-03.at.21.00.04.-.android.mov