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

Feature/use focus trap #3075

Merged
merged 7 commits into from
Sep 13, 2024
Merged

Conversation

Pragadesh-45
Copy link
Contributor

@Pragadesh-45 Pragadesh-45 commented Sep 12, 2024

fixes: #129

This PR implements a custom hook, useFocusTrap, to fix an issue where the tab order of dialogs is not limited to the current dialog but cycles through the elements on the main application window when the Modal component is used. This PR provides the suggested custom hook implementation from PR #448 .

Contribution Checklist:

  • The pull request addresses only one issue or adds one feature.
  • The pull request does not introduce any breaking changes.
  • I have added screenshots or GIFs to help explain the changes, if applicable.
  • I have read the contribution guidelines.
  • I have created an issue and linked it to the pull request.

Before:

20240912-0953-18.7692679.mp4

After:

20240912-0954-16.3809708.mp4

@helloanoop helloanoop merged commit a08573f into usebruno:main Sep 13, 2024
2 checks passed
@helloanoop helloanoop mentioned this pull request Sep 13, 2024
helloanoop pushed a commit that referenced this pull request Sep 20, 2024
… of PR #3075) (#3133)

* enhance useFocusTrap: implemented focus trapping, hide non-focusable elements

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

Successfully merging this pull request may close these issues.

Tab order on dialogs includes elements on the main application window
3 participants