Skip to content
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

disableScrolling doesn't work on mobile #608

Closed
Maculotti opened this issue Nov 10, 2017 · 4 comments
Closed

disableScrolling doesn't work on mobile #608

Maculotti opened this issue Nov 10, 2017 · 4 comments

Comments

@Maculotti
Copy link

Maculotti commented Nov 10, 2017

Hello there,
I set the option disablescrolling as a true but on a mobile device I can still scroll. Why?
this is my code:

// Lightbox
  // --------------------------------------------------
  lightbox.option({
    'resizeDuration': 200,
    'alwaysShowNavOnTouchDevices': true,
    'disableScrolling': true,
    'wrapAround': true,
    'fixedNavigation': true,
    'albumLabel' : '%1 / %2'
  })

I guess it's due to the hight of #lightboxOverlay element and the value applied to #lighbox element.

@davemin
Copy link

davemin commented Nov 15, 2017

Same issue on iOS not working.

@lokesh
Copy link
Owner

lokesh commented Nov 25, 2017

Fix incoming in next release. Currently in dev branch. Thanks for reporting.
#611

@lokesh
Copy link
Owner

lokesh commented Nov 26, 2017

Resolved: https://github.com/lokesh/lightbox2/releases/tag/v2.10.0

@lokesh lokesh closed this as completed Nov 26, 2017
@Maculotti
Copy link
Author

Maculotti commented Nov 30, 2017

I can't see the image anymore because the image container it's pushed down and the container is fixed.
@davemin is it working in your case?

May I suggest that if the options disableScrolling it's true always position the lightbox like this:
top: 50%
transform: translateY(-50%);

instead of using top: window.scrollTop() so it will be in the center of the fixed container.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants