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

Stacked modal lost keyboard trap navigation #3392

Closed
yenobi opened this issue Oct 3, 2019 · 0 comments · Fixed by #3422
Closed

Stacked modal lost keyboard trap navigation #3392

yenobi opened this issue Oct 3, 2019 · 0 comments · Fixed by #3422

Comments

@yenobi
Copy link

yenobi commented Oct 3, 2019

Bug description:

The focus doesn't stay within the modal window after interaction with a nested modal.

Step to reproduce:

Stackblitz env with bug.
(fork from stacked modals documentation)

  1. Open the first modal (launch initial modal button).
  2. Navigate via keyboard to launch nested modal button.
  3. Open nested modal via pressing space.
  4. Click the cross button or close button with the keyboard.
  5. Use the keyboard for navigation inside the initial modal.

Important:

  • While investigating the issue, discover, that it is reproducing only if the element that triggers the nested modal is the last interactive element in the initial modal.

Actual result:

  • The focus has moved beyond the modal window.

Expected result:

  • The focus moving within the modal window.

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 8.0.0

ng-bootstrap: 5.1.1

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