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

Whitelist Prop in Dialogs that use React-focus-trap #1305

Open
walter-restifo-syzygy opened this issue Dec 16, 2024 · 0 comments
Open

Whitelist Prop in Dialogs that use React-focus-trap #1305

walter-restifo-syzygy opened this issue Dec 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@walter-restifo-syzygy
Copy link

Is your feature request related to a problem? Please describe. A clear and concise description of what the
problem is. Ex. I'm always frustrated when [...]

In our Capacitor app, we have an unlock screen that appears when you visit another tab and then return to the app. On the unlock screen, you need to enter a PIN before you can continue using the app. If a modal from your useDialog is open, the focus remains in the modal, preventing the unlock screen input from being used to enter the PIN.

Describe the solution you'd like A clear and concise description of what you want to happen.

I believe this issue is related to the react-focus-trap npm package that you use. To resolve this problem, I had to install the package in my app and add input elements to the whitelist prop. My suggestion is to add a whitelist prop to the modal so that the focus does not remain in the modal if it is still open while an unlock screen or some other element is over the modal.

Describe alternatives you've considered A clear and concise description of any alternative solutions or
features you've considered.

Additional context Add any other context or screenshots about the feature request here.

@walter-restifo-syzygy walter-restifo-syzygy added the enhancement New feature or request label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant