mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-42974 UI: Modal dialogs do not work in IE8
This commit is contained in:
parent
d07b0302a9
commit
5298d02f6e
@ -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
@ -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;
|
||||
}
|
||||
|
12
lib/yui/src/notification/js/dialogue.js
vendored
12
lib/yui/src/notification/js/dialogue.js
vendored
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user