-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
key listeners inside a modal don't fire anymore #2066
Comments
Looks like the focus is stuck on the "open gallery" button, so all key events aren't targeting the lightbox. |
Also, lightbox is opening it's own portal, so any focus capturing assumption we have in modal won't really work. |
@stianjensen can you do something like this? https://stackblitz.com/edit/reactstrap-omwcih?file=Example.js This sandbox modifies yours by adding a new portal target for rendering the lightbox, so instead of rendering at the body level, it renders within the modal. |
Yeah, that looks like it works well - thanks! |
Cool thanks for confirming. Not sure if there's anything we can change on our end for that |
Modal
#8.8.0
es
#17.0.0
#4.5.3
What is happening?
Inside a Modal component, i am using react-image-lightbox for a small image gallery. When the image lightbox is visible I press my keyboard arrow keys, and the current image is not changing.
What should be happening?
Keybinds should work to navigate through images like they did when using reactstrap 8.7.1.
Steps to reproduce issue
Error message in console
No error output
Code
Reproduce:
https://stackblitz.com/edit/reactstrap-7upqrn?file=Example.js
Changing the reactstrap version from 8.8.1 to 8.7.1 in package.json makes the navigation work again.
I've installed builds of reactstrap locally and pinned down the issue to stem from the following commit:
bf46484
The text was updated successfully, but these errors were encountered: