-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Do not focus the last magic code input if it is empty #25741
Conversation
Reviewer Checklist
Screenshots/VideosWebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
@roryabraham The expected result in the linked issue ( chrome-desktop-issue-2023-08-23_15.16.55.mp4 |
@roryabraham Found another issue (Desktop Chrome):
chrome-desktop-focus-issue-2023-08-23_15.39.35.mp4 |
@roryabraham There's a pending fix on the original PR that introduced the behaviour to focus on the last input. Looks like it deals with some focus issues, so we might want to wait for that to get added before digging into the two issues I reported above. |
Crossposting: #23995 (comment) |
closing this, going to revert the PR that introduced the bug instead |
Details
We have some code that intentionally focuses the last input of the magic code if an error is detected. This allows the user to make simple corrections without having to re-type the whole code (I guess).
However, this doesn't work well when the error is coming from the code being entered implicitly via deeplink or from another tab. Therefore, this PR changes that code so that it only focuses the last input of the magic code if an error is detected and there is actually something occupying that text input.
Fixed Issues
$ #25728
Tests / QA Steps
Repeat the above several times because in my experience the issue wasn't always consistent on web.
Offline tests
n/a – online only flow.
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
webPart1.mov
webPart2.mov
Mobile Web - Chrome
screen-20230822-182627.mp4
screen-20230822-182542.mp4
Mobile Web - Safari
iOSWeb.mov
Desktop
n/a
iOS
iOS.mov
Android
Android.mov