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

[BUG] - Modal is not focus trapping when navigating using a keyboard #3204

Closed
kennyqiyenkan opened this issue Jun 6, 2024 · 2 comments · Fixed by #3137 or #3240
Closed

[BUG] - Modal is not focus trapping when navigating using a keyboard #3204

kennyqiyenkan opened this issue Jun 6, 2024 · 2 comments · Fixed by #3137 or #3240
Assignees
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working

Comments

@kennyqiyenkan
Copy link

NextUI Version

v2.4.1

Describe the bug

Opening a modal does not trap the focus within its contents when navigating using a keyboard (when it should according to the docs).

Context: Came across the issue on my application and it was reproducible on NextUI documentation site.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Navigate to the Usage section of the Modal documentation
  2. Open the example model using the keyboard
  3. Tab through the options in modal
  4. Able to focus on elements outside the modal

Expected behavior

When tabbing through the modal, it should loop back to the first interactable element in the modal.

Screenshots or Videos

Modal.Losing.Focus.Example.mov

Operating System Version

macOS

Browser

Chrome

Copy link

linear bot commented Jun 6, 2024

@wingkwong
Copy link
Member

Lemme handle that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working
Projects
None yet
2 participants