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(autocomplete): highlighted option not reset when closed with escape or enter key #6403

Merged

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Aug 10, 2017

Fixes the autocomplete active option not being reset when closing through the escape or enter keys. Previously the old active option would remain active upon reopening, however the user's focus would shift back to the top as soon as they press an arrow key.

Fixes #6258.

@crisbeto crisbeto requested a review from kara as a code owner August 10, 2017 19:53
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 10, 2017
@crisbeto crisbeto added the Accessibility This issue is related to accessibility (a11y) label Aug 10, 2017
Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

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

LGTM, but I did notice that the highlighted option is not reset when selecting with ENTER either. Is this intended?

@kara kara assigned crisbeto and unassigned kara Aug 10, 2017
@crisbeto
Copy link
Member Author

I'm not sure it is, although it probably isn't as noticeable because you're only left with one option at that point. I'll do the same for enter and add an extra unit test for it.

…pe or enter key

Fixes the autocomplete active option not being reset when closing through the escape or enter keys. Previously the old active option would remain active upon reopening, however the user's focus would shift back to the top as soon as they press an arrow key.

Fixes angular#6258.
@crisbeto crisbeto force-pushed the 6258/autocomplete-escape-reset branch from 36836f4 to de6f383 Compare August 11, 2017 19:01
@crisbeto crisbeto changed the title fix(autocomplete): highlighted option not reset when closed with escape key fix(autocomplete): highlighted option not reset when closed with escape or enter key Aug 11, 2017
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Aug 11, 2017
@andrewseguin andrewseguin merged commit bf59468 into angular:master Aug 15, 2017
@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 6, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[autocomplete] invalid initially active option after escape
4 participants