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

NgbDropdownItem breaks activating a button with Enter/Space #3570

Closed
ghost opened this issue Jan 28, 2020 · 2 comments · Fixed by #3573
Closed

NgbDropdownItem breaks activating a button with Enter/Space #3570

ghost opened this issue Jan 28, 2020 · 2 comments · Fixed by #3573

Comments

@ghost
Copy link

ghost commented Jan 28, 2020

Link to minimally-working StackBlitz that reproduces the issue:

https://stackblitz.com/edit/angular-prjmrz?file=app/dropdown-basic.html

Bug description:

When NgbDropdownItem is applied, Enter or Space don't trigger (click) handler.

  1. Use Tab to select first dropdown
  2. Press Enter to open dropdown
  3. Navigate to any dropdown item using arrow keys
  4. Press Enter or Space. Nothing happens

  1. Use Tab to select second dropdown
  2. Press Enter to open dropdown
  3. Navigate to any dropdown item using Tab key
  4. Press Enter or Space. Function assigned to (click) handler is executed.

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 8.2.4
ng-bootstrap: 5.2.1
Browser: Google Chrome

@maxokorokov
Copy link
Member

Related to #3561 I guess

@maxokorokov
Copy link
Member

Looks like for this particular case we still need to close the popup asynchronously using either requestAntimationFrame or setTimeout

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.

1 participant