Skip to content
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(material/chips): simplify repeat chip removal prevention #29048

Merged
merged 1 commit into from
May 16, 2024

Conversation

crisbeto
Copy link
Member

We have some logic that prevents chip removal if the users is holding down the backspace key. It currently breaks down in the case where a value is pasted into the input via click.

These changes simplify our detection by using KeyboardEvent.repeat which also resolves the paste issue.

@crisbeto crisbeto added G This is is related to a Google internal issue target: patch This PR is targeted for the next patch release labels May 15, 2024
@crisbeto crisbeto requested a review from mmalerba as a code owner May 15, 2024 07:11
We have some logic that prevents chip removal if the users is holding down the backspace key. It currently breaks down in the case where a value is pasted into the input via click.

These changes simplify our detection by using `KeyboardEvent.repeat` which also resolves the paste issue.
Copy link
Contributor

@andrewseguin andrewseguin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice simplification

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label May 16, 2024
@crisbeto crisbeto merged commit 46bcc21 into angular:main May 16, 2024
23 of 26 checks passed
crisbeto added a commit that referenced this pull request May 16, 2024
We have some logic that prevents chip removal if the users is holding down the backspace key. It currently breaks down in the case where a value is pasted into the input via click.

These changes simplify our detection by using `KeyboardEvent.repeat` which also resolves the paste issue.

(cherry picked from commit 46bcc21)
crisbeto added a commit that referenced this pull request May 16, 2024
We have some logic that prevents chip removal if the users is holding down the backspace key. It currently breaks down in the case where a value is pasted into the input via click.

These changes simplify our detection by using `KeyboardEvent.repeat` which also resolves the paste issue.

(cherry picked from commit 46bcc21)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker G This is is related to a Google internal issue target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants