-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Conversation
…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.
Marking as a P2, because it's a regression. |
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. 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 😄
Ah, this might explain why that earlier change was causing a failing that's been blocking the sync... |
Wow, yeah, that was the issue. Turns out exactly one e2e test in all of Google caught it. |
That's good news. I just don't understand why no test actually covered that clicking on the |
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. |
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. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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.