Unnecessary focus on the Add payment method button#9348
Unnecessary focus on the Add payment method button#9348thienlnam merged 10 commits intoExpensify:mainfrom
Conversation
|
@allroundexperts thanks for raising the PR so quickly! Could you please add tests for this comment #9248 (comment), and add screenshots for all platforms. Also, it'll be helpful to add this image in tests as in this is what shouldn't happen. |
Are you talking about unit tests @rushatgabhane? |
|
@allroundexperts sorry that I wasn't clear. I was referring to test steps in the PR description. |
|
@allroundexperts just waiting on this #9348 (comment) |
|
@rushatgabhane Updated. |
There was a problem hiding this comment.
@thienlnam LGTM!
Also, the user can navigate through menus and buttons by clicking and then using keyboard shortcuts and vice versa. I verified it for a few other buttons too.
Screen.Recording.2022-06-13.at.4.07.40.PM.mov
PR Reviewer Checklist
|
|
Found a console error which is unrelated to the PR. https://expensify.slack.com/archives/C01GTK53T8Q/p1655128339662359 |
@allroundexperts can you please add some steps for this in the Tests and QA section of this PR. |
thienlnam
left a comment
There was a problem hiding this comment.
Awesome, thanks for accommodating those changes
|
✋ 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 @thienlnam in version: 1.1.77-0 🚀
|
|
🚀 Deployed to production by @roryabraham in version: 1.1.77-2 🚀
|

Details
The css selector :focus-visible is responsible for showing up the outline. When the selector :focus-visible is applied to an element is largely dependent browser implementation. As always, the problematic browser is Safari. Safari restores focus on an element even if an event is a click. On Chrome and other browser, focus is restored if event type is keypress ie closing modal by keyboard.
Fixed Issues
$ #9248
Tests
Make sure that there is no focus on the Add payment method button ie

PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */displayNamepropertythisproperly 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)PR Reviewer Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesSTYLE.md) were followed/** comment above it */displayNamepropertythisproperly 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)QA Steps
Make sure that there is no focus on the Add payment method button ie

Screenshots
Web
Screen.Recording.2022-06-12.at.1.03.48.AM.mov
Mobile Web
Simulator.Screen.Recording.-.iPhone.13.-.2022-06-04.at.00.24.33.mp4
Android
Screen.Recording.2022-06-12.at.1.06.46.AM.mov
iOS
Simulator.Screen.Recording.-.iPhone.13.-.2022-06-12.at.01.20.26.mp4
Desktop
Screen.Recording.2022-06-12.at.1.23.07.AM.mov