MDL-42974 UI: Modal dialogs do not work in IE8
authorsam marshall <s.marshall@open.ac.uk>
Wed, 24 Sep 2014 11:04:48 +0000 (12:04 +0100)
committersam marshall <s.marshall@open.ac.uk>
Fri, 26 Sep 2014 14:47:36 +0000 (15:47 +0100)
lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js
lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue.js
lib/yui/src/notification/js/dialogue.js

index 1b9bc93..5ab6c80 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js and b/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js differ
index 57eddc5..8b58eea 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js and b/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js differ
index 680a56b..dadf0e8 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue.js and b/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue.js differ
index 2164009..b7788c2 100644 (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;
         }