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

fix: auto-focus in case of activeElement disappearance, fixes #321 #324

Merged
merged 2 commits into from
Aug 25, 2024

Conversation

theKashey
Copy link
Owner

  • if element is lost, restore focus
  • if element is no longer focusable, restore focus

This change adds logic to "blur" event that triggers when focus moves to body.
In this case focus-lock will try to understand why it happened and apply focus-restoration logic if applicable.

@theKashey theKashey merged commit 29d2c8b into master Aug 25, 2024
3 checks passed
nickspaargaren pushed a commit to nickspaargaren/react-focus-lock that referenced this pull request Dec 11, 2024
fix: auto-focus in case of activeElement disappearance, fixes theKashey#321
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant