dimsemenov / PhotoSwipe

JavaScript image gallery for mobile and desktop, modular, framework independent
http://photoswipe.com
MIT License
24.18k stars 3.31k forks source link

Photoswipe - Scrolling and Image closing #1148

Open cdwebdev opened 8 years ago

cdwebdev commented 8 years ago

How do I configure Photoswipe such that when I scroll, the image does not automatically close. Please advise.

illagrenan commented 8 years ago

Set closeOnScroll: false, more info in the documentation: http://photoswipe.com/documentation/options.html.

cdwebdev commented 8 years ago

I thought that would do it. However when I set closeOnScroll to false, it does not let me scroll in desktop. Which I guess is ok as I am forced to close the image by clicking on the x. However on an actuall device I can scroll down when the image is open and the image closes. How do i prevent that from happening as well.

JoelDorrington commented 6 years ago

Try closeOnVerticalDrag: false