Skip to content

fix(material-experimental/chips): remove icon responds to invalid keys #19503

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

Closed
wants to merge 1 commit into from

Conversation

vanessanschmitt
Copy link
Collaborator

Fixes an issue where pressing any non-arrow key while the chip
remove icon is focused removes the chip. This should only happen for
ENTER or SPACE. This issue was introduced when MDC refactored the
chip foundation. The handleTrailingIconInteraction method, which
used to call shouldHandleInteraction to detect if the keydown event
was ENTER or SPACE, was replaced with handleTrailingActionInteraction,
which handles all keydown events. This change was made in
github.com/material-components/material-components-web/pull/5890, and
MDC chips were migrated in github.com//pull/19318.

@vanessanschmitt vanessanschmitt requested a review from mmalerba as a code owner June 1, 2020 21:33
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jun 1, 2020
Fixes an issue where pressing any non-arrow key while the chip
remove icon is focused removes the chip. This should only happen for
ENTER or SPACE. This issue was introduced when MDC refactored the
chip foundation. The handleTrailingIconInteraction method, which
used to call shouldHandleInteraction to detect if the keydown event
was ENTER or SPACE, was replaced with handleTrailingActionInteraction,
which handles all keydown events. This change was made in
material-components/material-components-web/pull/5890, and MDC chips
were migrated in angular/pull/19318.
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

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

LGTM

@mmalerba mmalerba added G This is is related to a Google internal issue P2 The issue is important to a large percentage of users, with a workaround lgtm action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Jun 1, 2020
@crisbeto
Copy link
Member

crisbeto commented Jun 2, 2020

There's a pull request for this already #19425.

@vanessanschmitt
Copy link
Collaborator Author

There's a pull request for this already #19425.

Oh I didn't see this, thank you for pointing it out! @mmalerba Should I abandon this PR so you can approve that one instead? We need this fix for Pantheon but both PRs do the same thing and both add tests, so I'm not tied to this one.

@mmalerba
Copy link
Contributor

mmalerba commented Jun 2, 2020

Ok, I've bumped the priority on that one to match this one and approved it. Closing this one

@mmalerba mmalerba closed this Jun 2, 2020
@vanessanschmitt
Copy link
Collaborator Author

Thank you!

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement G This is is related to a Google internal issue P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants