Skip to content

Commit 219c5bb

Browse files
author
Glen Somerville
committed
Added support for IE6 in expose to prevent select elements from showing through.
1 parent d65b237 commit 219c5bb

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

src/toolbox/toolbox.expose.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@
6262
if (fn) { return fn.call($.mask); }
6363
}
6464

65-
var mask, exposed, loaded, config, overlayIndex;
65+
var mask, exposed, loaded, config, overlayIndex, iframe;
6666

67+
var isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest;
6768

6869
$.mask = {
6970

@@ -102,9 +103,23 @@
102103
height: size[1],
103104
display: 'none',
104105
opacity: conf.startOpacity,
105-
zIndex: conf.zIndex
106+
zIndex: isIE6 ? conf.zIndex - 1 : conf.zIndex
106107
});
107108

109+
// IE6 iframe to hide select elements
110+
if (isIE6) {
111+
iframe = $('<iframe src="' + (/^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank' ) + '" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(mask);
112+
iframe.css({
113+
position: 'absolute',
114+
top: 0,
115+
left: 0,
116+
width: size[0],
117+
height: size[1],
118+
background: 'transparent',
119+
zIndex: conf.zIndex
120+
});
121+
}
122+
108123
if (conf.color) {
109124
mask.css("backgroundColor", conf.color);
110125
}
@@ -190,6 +205,9 @@
190205
if (loaded) {
191206
var size = viewport();
192207
mask.css({width: size[0], height: size[1]});
208+
if (isIE6) {
209+
iframe.css({width: size[0], height: size[1]});
210+
}
193211
}
194212
},
195213

0 commit comments

Comments
 (0)