blueimp / Gallery

blueimp Gallery is a touch-enabled, responsive and customizable image & video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers. It features swipe, mouse and keyboard navigation, transition effects, slideshow functionality, fullscreen support and on-demand content loading.
https://blueimp.github.io/Gallery/
Other
3.75k stars 984 forks source link

modal stuck after closing gallery using ESC #257

Closed Maransatto closed 2 years ago

Maransatto commented 3 years ago

Hi,

I have a bootstrap modal and inside it a gallery. The issue I'm facing is when I hit the keyboard button "Esc" to close the gallery. When I do this, the gallery is close and so the bootstrap modal.

After that, when I open the modal again, it becomes completely static.

Is there any way to prevent the gallery of being closed when hitting esc button? or maybe trying to fix this sync issue.

Note: I'm using it with angular.

Maransatto commented 3 years ago

I've just found the solution. Instead of preventing the gallery to close on exit, I prevent the modal adding the following attributes: data-backdrop="static" data-keyboard="false"

https://solidlystated.com/design/bootstrap-modal-disable-closing-with-esc-key-or-mouse/

blueimp commented 2 years ago

Closing as solved.