MDL-42974 UI: Modal dialogs do not work in IE8

This commit is contained in:
sam marshall 2014-09-24 12:04:48 +01:00
parent d07b0302a9
commit 5298d02f6e
4 changed files with 38 additions and 2 deletions

View File

@ -176,6 +176,18 @@ Y.extend(DIALOGUE, Y.Panel, {
this.set('zIndex', zindexvalue);
if (this.get('modal')) {
ol.setStyle('zIndex', zindexvalue);
// In IE8, the z-indexes do not take effect properly unless you toggle
// the lightbox from 'fixed' to 'static' and back. This code does so
// using the minimum setTimeouts that still actually work.
if (Y.UA.ie && Y.UA.compareVersions(Y.UA.ie, 9) < 0) {
setTimeout(function() {
ol.setStyle('position', 'static');
setTimeout(function() {
ol.setStyle('position', 'fixed');
}, 0);
}, 0);
}
}
this._calculatedzindex = true;
}

File diff suppressed because one or more lines are too long

View File

@ -176,6 +176,18 @@ Y.extend(DIALOGUE, Y.Panel, {
this.set('zIndex', zindexvalue);
if (this.get('modal')) {
ol.setStyle('zIndex', zindexvalue);
// In IE8, the z-indexes do not take effect properly unless you toggle
// the lightbox from 'fixed' to 'static' and back. This code does so
// using the minimum setTimeouts that still actually work.
if (Y.UA.ie && Y.UA.compareVersions(Y.UA.ie, 9) < 0) {
setTimeout(function() {
ol.setStyle('position', 'static');
setTimeout(function() {
ol.setStyle('position', 'fixed');
}, 0);
}, 0);
}
}
this._calculatedzindex = true;
}

View File

@ -147,6 +147,18 @@ Y.extend(DIALOGUE, Y.Panel, {
this.set('zIndex', zindexvalue);
if (this.get('modal')) {
ol.setStyle('zIndex', zindexvalue);
// In IE8, the z-indexes do not take effect properly unless you toggle
// the lightbox from 'fixed' to 'static' and back. This code does so
// using the minimum setTimeouts that still actually work.
if (Y.UA.ie && Y.UA.compareVersions(Y.UA.ie, 9) < 0) {
setTimeout(function() {
ol.setStyle('position', 'static');
setTimeout(function() {
ol.setStyle('position', 'fixed');
}, 0);
}, 0);
}
}
this._calculatedzindex = true;
}