-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix input label is deactivated even when there is a value #26399
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 input label is deactivated even when there is a value #26399
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
@cubuspl42 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] |
| if ( | ||
| hasValueRef.current || | ||
| isFocused || | ||
| // If the text has been supplied by Chrome autofill, the value state is not synced with the value |
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.
This diff block is just moving the comment, am I right?
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.
Yep
Reviewer Checklist
Screenshots/VideosWebpdf-input-focus-web.mp4Mobile Web - ChromeMobile Web - Safaripdf-input-focus-ios-web.mp4DesktopiOSpdf-input-focus-ios.mp4Androidpdf-input-focus-android-compressed.mp4 |
Beamanator
left a comment
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.
LGTM!
|
✋ 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/Beamanator in version: 1.3.62-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.62-4 🚀
|
Details
If a text input is uncontrolled, even if the input contains a text, the label will be deactivated on blur.
Fixed Issues
$ #25508
PROPOSAL: #25508 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
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
Screen.Recording.2023-08-31.at.20.55.05.mov
Mobile Web - Chrome
Screen.Recording.2023-08-31.at.21.02.37.mov
Mobile Web - Safari
Screen.Recording.2023-08-31.at.21.01.42.mov
Desktop
Screen.Recording.2023-08-31.at.20.58.07.mov
iOS
Screen.Recording.2023-08-31.at.21.00.38.mov
Android
Screen.Recording.2023-08-31.at.21.13.21.mov