RobinCK / vue-gallery

:camera: Responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers. 🇺🇦
https://robinck.github.io/vue-gallery/
MIT License
470 stars 85 forks source link

back button on Android tends to close the whole app instead of just the gallery #137

Open vesper8 opened 2 years ago

vesper8 commented 2 years ago

This is kind of an edge case but I'm posting it anyway in case someone else has experienced the same thing and has an idea on how to resolve it.

I'm using this library in a Cordova app and something odd is happening. My "landing page" has a gallery on it, so at this point there is no history in the browser. When you open the gallery, if you click the back button (physical back button on Android) it will correctly close the gallery the first time.

But if you open it a 2nd time and click the back button, this time it exists the app each and every time.

Also, if you open the gallery (1st time) and then swipe a few times and then hit the back button, it will also close the app completely instead of just closing the gallery.

I can't see anywhere in the code of this package where the history is being manipulated.. maybe it's being done in blueimp-gallery itself. This is an odd but very annoying problem/bug and I'm having a hard time coming up with a fix.