Do not focus the last magic code input if it is empty#25741
Closed
roryabraham wants to merge 1 commit intomainfrom
Closed
Do not focus the last magic code input if it is empty#25741roryabraham wants to merge 1 commit intomainfrom
roryabraham wants to merge 1 commit intomainfrom
Conversation
Contributor
Author
Contributor
Reviewer Checklist
Screenshots/VideosWebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
Contributor
|
@roryabraham The expected result in the linked issue ( chrome-desktop-issue-2023-08-23_15.16.55.mp4 |
Contributor
|
@roryabraham Found another issue (Desktop Chrome):
chrome-desktop-focus-issue-2023-08-23_15.39.35.mp4 |
Contributor
|
@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. |
58 tasks
Contributor
|
Crossposting: #23995 (comment) |
Contributor
Author
|
closing this, going to revert the PR that introduced the bug instead |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 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
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