lokesh / lightbox2

THE original Lightbox script (v2).
http://lokeshdhakar.com/projects/lightbox2/
MIT License
6.22k stars 1.77k forks source link

visibility hidden/visble on start/end #520

Closed ShionNoAries closed 5 years ago

ShionNoAries commented 8 years ago

Got a problem on my page when lightbox disappears. Some of my invisibles elements was visible against my will. Visibly on start, the lightbox do that : $('select, object, embed').css({ visibility: 'hidden' }); and on end : $('select, object, embed').css({ visibility: 'visible' }); Regardless if elements was visible before the lightbox appears.

Somethings like that can i think resolve this i think : this.hidenedElements = $('select, object, embed').filter(function() { return !($(this).css('visibility') == 'hidden' || $(this).css('display') == 'none'); });

And use this globale variable to hide and show elements. I start to use jquery today, so i'm not totally sure about what i wrote.

Sorry about my english and thanks for reading me.

janzii commented 6 years ago

I have this issue also. Selects from hidden divs pops up after lightbox.end.

As long as the element didn't have visibility set explicitly before lightbox open, this can be resolved by setting visibility to "" instead of "visible", but at least for me those elements don't really need hiding in the first place.

lokesh commented 5 years ago

Fixed in v2.11.0: https://github.com/lokesh/lightbox2/releases/tag/v2.11.0