-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Disable Scrolling scrolls to top when image is clicked. #620
Comments
It looks like the class ".lb-disable-scrolling" is the issue. I commented out the "position: fixed;" attribute and it seems to be working fine now on desktop.
The author put a note in here though saying position: fixed is required for iOS. I am going to add this to the css to see if I can make it work on iOS as well (haven't tested yet):
|
position static work in iOS device and you can't scroll. |
Just add this script to disable scrolling in lighbox
|
Should be fixed in v2.11.0: https://github.com/lokesh/lightbox2/releases/tag/v2.11.0 Please reopen if issue persists for anyone. |
This is still an issue in 2.11.1 version. When first image is clicked it is scrolling top. |
There is a bug when using this package on IE11. When anchor element is clicked the screen jumps to the top of the page. This issue was found using browserstack to test website on IE11 windows. I also tested on http://lokeshdhakar.com/projects/lightbox2/#examples to make sure it just wasnt the website im working on and same issue persists. |
Does this issue happen irregardless of the Related: #667 (comment) |
Yes, either true or false.
For me i can replicate on latest Google chrome and Firefox
…On Wed, 4 Sep. 2019, 10:08 am Lokesh Dhakar, ***@***.***> wrote:
More info: #667 (comment)
<#667 (comment)>
Does this issue happen irregardless of the disableScrolling value? I'm
going to use browserstack and verify later this week, in-transit for a bit.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#620?email_source=notifications&email_token=ABZHIJTQ2GN3V2SV5I2WVPDQH34BJA5CNFSM4EPA5MDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5Z5XSY#issuecomment-527686603>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABZHIJV5HFCOHR63CRKOXT3QH34BJANCNFSM4EPA5MDA>
.
|
Yeah, can also reproduce on chrome and firefox. |
I am having trouble with this issue as well still. Even when set to true, it will still scroll to top on iPhone safari use. |
I encountered the same issue while playing with the latest version, and I noticed that this happens only when I set the resizeDuration to 0. (during all of my tests, I had the disableScrolling = true option). The solution for me was to set the resizeDuration to anything greater than 0, so I went with 1. Hope this helps you find the issue @lokesh ! |
Yes this is an issue for me as well. However, the default of @lokesh The issue is also on the examples as well, so I think it's reproducible on almost every browser. Thing to note is that it doesn't happen every time I open the image. The best way for me to see it is to open fresh a page, scroll to the image straight away, and then click the problematic image right away. |
This describes it very good. I am having the issue on a Chromium browser (v84.0.4147.105) and with
I also tried The solution in #667 seems to help. |
Why does clicking the image to open the modal scrolls the page to the top when
disableScrolling
is true?To produce the following bug, go to Lightbox Examples, open the console, and enter the following.
Then before clicking an image, scroll so that you're not at the top of the page but you should still see the image (so you could click it tho).
After clicking, you can see that the modal opens but the page scrolls up, leaving the modal down there! Are there other things that I should do when implementing
disableScrolling
?The text was updated successfully, but these errors were encountered: