ashleydw / lightbox

A lightbox gallery plugin for Bootstrap
http://ashleydw.github.io/lightbox
MIT License
1.85k stars 1.3k forks source link

Scrolling on mobile browsers #194

Closed DarrenAtkinson closed 8 years ago

DarrenAtkinson commented 8 years ago

Hi,

I'm using the lightbox however when I load remote content on a mobile that is too long for the page I am unable to scroll the lightbox down to view the content not currently visible. When I attempt to scroll down to view content that ends up off the bottom of the viewscreen, the background page is scrolled, not the lightbox contents.

Strange thing is this, if I rotate the phone from portrait to landscape (or vice versa) then scrolling starts to work perfectly, I can rotate the device back again to my original orientation and scrolling keeps working fine. It just seems to be when it is first opened.

I tried on a mobile simlulator online and there isn't a problem, it only seems to happen when actually using a mobile device. I'm on an iphone 6 and the same thing happens in the safari and chrome browsers installed on the phone.

You can see a test page here: http://staging2.multiplemonitors.co.uk/products/ultra-multi-monitor-pc/ - scroll down to the specification and customisation options and click on one of the green 'Learn More' links, pretty much all of them have too much content to fit on a standard mobile screen and display this behaviour.

Let me know if you can replicate or if you need any further details.

Thanks, Darren.

ashleydw commented 8 years ago

Most likely an issue with the modal in bootstrap itself, did you try these suggestions?

https://github.com/twbs/bootstrap/issues/7501

DarrenAtkinson commented 8 years ago

Thanks for the reply, I couldn't resolve the issue at your previous link however it did lead me to further digging on the bootstrap modals and I found a resolution here: https://github.com/twbs/bootstrap/issues/14839 - basically I removed the css rule '-webkit-overflow-scrolling: touch' from the master bootstrap.css file and the lightbox now scrolls fine on both the iphone broswers.

Thanks for pointing me in the right direction.