summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--js/lightbox.js2
-rw-r--r--js/lightbox_lite.js8
2 files changed, 7 insertions, 3 deletions
diff --git a/js/lightbox.js b/js/lightbox.js
index 56db259..ff70a9a 100644
--- a/js/lightbox.js
+++ b/js/lightbox.js
@@ -335,7 +335,7 @@ var Lightbox = {
start: function(imageLink) {
// replaces hideSelectBoxes() and hideFlash() calls in original lightbox2
- $("select, embed, object").hide();
+ $("select[display!='none'], embed[display!='none'], object[display!='none']").hide();
// stretch overlay to fill page and fade in
var arrayPageSize = Lightbox.getPageSize();
diff --git a/js/lightbox_lite.js b/js/lightbox_lite.js
index a82714a..f1563da 100644
--- a/js/lightbox_lite.js
+++ b/js/lightbox_lite.js
@@ -212,7 +212,9 @@ function showLightbox(objLink) {
// Hide select boxes as they will 'peek' through the image in IE
selects = document.getElementsByTagName("select");
for (i = 0; i != selects.length; i++) {
- selects[i].style.visibility = "hidden";
+ if (selects[i].style.display != "none") {
+ selects[i].style.visibility = "hidden";
+ }
}
objLightbox.style.display = 'block';
@@ -253,7 +255,9 @@ function hideLightbox() {
// make select boxes visible
selects = document.getElementsByTagName("select");
for (i = 0; i != selects.length; i++) {
- selects[i].style.visibility = "visible";
+ if (selects[i].style.display != "none") {
+ selects[i].style.visibility = "visible";
+ }
}
// disable keypress listener