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(chips): chip list removing focus from first chip when adding through the input #12840

Merged
merged 1 commit into from
Aug 26, 2018

Conversation

crisbeto
Copy link
Member

Something I ran into while aligning the chips with the new spec, which seems to have been introduced in 3da390e. Currently when the user removes all the chips and then they add a new chip, the chip list will remove focus from the input and put it on the chip. These changes introduce the proper behavior, which is to keep focus on the input.

…ugh the input

Something I ran into while aligning the chips with the new spec, which seems to have been introduced in 3da390e. Currently when the user removes all the chips and then they add a new chip, the chip list will remove focus from the input and put it on the chip. These changes introduce the proper behavior, which is to keep focus on the input.
@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround Accessibility This issue is related to accessibility (a11y) target: patch This PR is targeted for the next patch release labels Aug 26, 2018
@crisbeto crisbeto requested a review from jelbourn as a code owner August 26, 2018 14:06
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 26, 2018
@crisbeto
Copy link
Member Author

Marking as a P2, because it's a regression.

Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

LGTM. Makes sense to get it in before 3da390e will be published. Though not sure if it can be considered a regression if the general focus restoring (through click) didn't work before at all 😄

@devversion devversion added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Aug 26, 2018
@jelbourn
Copy link
Member

Ah, this might explain why that earlier change was causing a failing that's been blocking the sync...

@jelbourn
Copy link
Member

Wow, yeah, that was the issue. Turns out exactly one e2e test in all of Google caught it.

@devversion
Copy link
Member

That's good news. I just don't understand why no test actually covered that clicking on the chip remove button does return focus always to the first chip (which is incorrect)

@jelbourn
Copy link
Member

That's the nature of things- we do our best to test every scenario, but something will always be forgotten. As long as we add tests with every fix things will always get better.

@jelbourn jelbourn merged commit c3b2d4f into angular:master Aug 26, 2018
@crisbeto
Copy link
Member Author

FWIW, I think the other tests didn't catch it, because they're usually resetting the chips programmatically, but this only happens when you've removed all the chips using backspace.

jelbourn pushed a commit that referenced this pull request Aug 29, 2018
…ugh the input (#12840)

Fix regression in 3da390e. Currently when the user removes all the chips and then they add a new chip, the chip list will remove focus from the input and put it on the chip. These changes introduce the proper behavior, which is to keep focus on the input.
@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 Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility This issue is related to accessibility (a11y) action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement 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