Closed clouddueling closed 10 years ago
Yeah, this issue happen to me as well: Please see demo here http://diaocx.com/duan_s/du-an-chung-cu-euroland-tsq-chung-cu-lang-viet-kieu-chau-au.html
i have the same issue if the page is very long, the lightbox opens on bottom of the sreen I can´t change it.
please see the test-page here: http://www.the-flying-stars.de/galerie4-2.htm ... in the 6. galery
@mergjo @hothandao Have you tried my left position fix? Did it work for you as well?
Hello clouddueling. I don´t know, hwat you mean. Sorry, I´m only a "user", not a progammer.
left is "0" (zero)
...
/* line 20, ../sass/lightbox.sass */ .lightbox { position: absolute; left: 0; width: 100%; z-index: 10000; text-align: center; line-height: 0; font-weight: normal;
...
on a short page the lightbox.css works fine. see: http://www.the-flying-stars.de/galerie4-1.htm
but not on a very long page.
whitch parametre is impotant for the "high position"?
@mergjo Would you mind changing left
in the css to -10000px
and see if this problem persists for you?
left: -10000px;
the same problem, as before
I had the same problem as mergjo. I tried to change the css, as described above, but it did not help me. Then I look into the js file lightbox-2.6.min.js i'm not a javacript programmer, i just search word "top:", because it is responsible for the location in html: div id="lightbox" class="lightbox" style="display: block; top: 4298.05px; left: 0px;"
i find this word in lightbox-2.6.min.js on line: f=b(window);o=f.scrollTop()+f.height()/10;n=f.scrollLeft();this.$lightbox.css({top:o+'px',left:n+'px'})
i.e. top:o+'px' and o=f.scrollTop()+f.height()/10
to decrease variable 'o' i changed 10 to 100: o=f.scrollTop()+f.height()/100
and it works! now my pics open at right height, even if the height of the page is over 9000 px
Hello danglering, it´s great!! Thanks for this idea.
I also changed 10 to 100 and it works fine!
mergjo, you are welcome! I just struggled with this problem for over a month, so I decided to tell the others about my solution )
Thank you danglering. I changed mine to: o=f.scrollTop()+10 which then does not based the position on the height of you page at all... it just put's it 10px down on the page.
I tried the css left change, and the js change, to both +10 and /100. None of these have worked for me.
So frustrating.
Doing some Github Issues cleanup.
I'm unable to recreate this issue. If this problem still exists for anyone please post a link and I will reopen this issue and investigate. Thanks.
I could observe this issue with LB 2.8.2, by calling lightbox.init()
twice. First time, everything works as expected. Second time, the loader is shown as described by @clouddueling.
Fixes:
lightbox.init()
only once. Definitely the right thing to do, since calling it twice is unnecessary. Maybe a check could be done internally by LB to avoid the mistake (on second call, throw an error or do nothing).
When the height of my window is large enough this appears:
When I change left to: -10000px then it disappears. I don't know the codebase well enough to know if it causes other problems but appears to work.![screen shot 2013-09-05 at 3 24 14 pm](https://f.cloud.github.com/assets/1400735/1092308/ebd3f21a-1679-11e3-8980-6db0d672d4bb.png)