-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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, textarea): clearOnEdit does not clear when pressing Tab #28005
Merged
Conversation
This file contains 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
Run & review this pull request in StackBlitz Codeflow. |
liamdebeasi
changed the title
Fw 4668
fix(input, textarea): text field does not clear when pressing Tab with clearOnEdit
Aug 16, 2023
liamdebeasi
changed the title
fix(input, textarea): text field does not clear when pressing Tab with clearOnEdit
fix(input, textarea): clearOnEdit does not clear when pressing Tab
Aug 16, 2023
liamdebeasi
requested review from
a team and
brandyscarney
and removed request for
a team
August 16, 2023 16:25
brandyscarney
approved these changes
Aug 18, 2023
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! Nice fix and addition of tests. 👍
3 tasks
2 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 11, 2023
Issue number: resolves #28633 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> In #28005 I introduced a fix that causes "clearOnEdit" to not clear input/textarea when the Tab key was pressed. However, there were several edge cases I missed. For instance, pressing the "shift" key and then the "tab" key would still clear the input because "shift" was not explicitly excluded. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Input and textarea now explicitly ignores modifier keys that do not change the value of the input - `didInputClearOnEdit` is not set to `true` when an ignored key is pressed. Otherwise, pressing an ignored key and then an accepted key would not cause the input to be cleared. For example, pressing "shift", releasing "shift", then pressing "A" should cause the input to still get cleared. - Added test coverage ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Playwright bug report for a9f34a5: microsoft/playwright#28495
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.
Issue number: resolves #27746
What is the current behavior?
Pressing the Tab key when focused on an input/textarea with
clearOnEdit
clears the text field and then moves focus to the next focusable element.What is the new behavior?
index.html
file in the basic directory, so I added that.Does this introduce a breaking change?
Other information
Dev build:
7.3.1-dev.11692202566.13cd16c4