-
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 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? |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
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