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

Dropdown menu isn't closed on Enter / Space #3142

Closed
maxokorokov opened this issue Apr 25, 2019 · 1 comment · Fixed by #3180
Closed

Dropdown menu isn't closed on Enter / Space #3142

maxokorokov opened this issue Apr 25, 2019 · 1 comment · Fixed by #3180

Comments

@maxokorokov
Copy link
Member

maxokorokov commented Apr 25, 2019

Bug description:

Dropdown should be closed when pressing Enter / Space and dropdown item is focused, but it's not

Link to minimally-working StackBlitz that reproduces the issue:

Stackblitz with both ng-bootstrap and bootstrap dropdowns to compare:

https://stackblitz.com/edit/angular-uahpzh?file=index.html

To reproduce:

  • Focus ng-bootstrap button with keyboard
  • Press ArrowDown to open menu
  • Press ArrowDown again to focus first item ('New around here? Signup')
  • Press Enter / Space
  • Dropdown menu should close, but it's not.

Versions of Angular, ng-bootstrap and Bootstrap:

ng-bootstrap: 4.1.1

@maxokorokov maxokorokov changed the title Dropdown menu isn't closed on Enter Dropdown menu isn't closed on Enter / Space Apr 25, 2019
@maxokorokov maxokorokov added this to the 4.1.3 milestone May 6, 2019
maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue May 7, 2019
maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue May 7, 2019
maxokorokov added a commit to maxokorokov/ng-bootstrap that referenced this issue May 13, 2019
@dave0783
Copy link

dave0783 commented Jun 3, 2019

FYI this fix breaks (keyup.enter) binding. (keyup.enter)="handleSelect()" is now never called. I had to change to (keydown.enter) to make this work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants