]> git.mjollnir.org Git - moodle.git/commitdiff
Not so nice fix for "Not allowed to write to dialogs" on FireFox!
authorjulmis <julmis>
Fri, 20 Aug 2004 09:56:07 +0000 (09:56 +0000)
committerjulmis <julmis>
Fri, 20 Aug 2004 09:56:07 +0000 (09:56 +0000)
lib/editor/dialog.js

index a43e644daa07a021384945c558e4e1adf2aa7fd1..eb8a8f90fe4071d9603ca50d01f0e5087150dd80 100644 (file)
@@ -61,7 +61,9 @@ Dialog._geckoOpenModal = function(url, action, init) {
     };
     capwin(window);
     // capture other frames
-    for (var i = 0; i < window.frames.length; capwin(window.frames[i++]));
+    if(document.all) {
+        for (var i = 0; i < window.frames.length; capwin(window.frames[i++]));
+    }
     // make up a function to be called when the Dialog ends.
     Dialog._return = function (val) {
         if (val && action) {
@@ -69,7 +71,9 @@ Dialog._geckoOpenModal = function(url, action, init) {
         }
         relwin(window);
         // capture other frames
-        for (var i = 0; i < window.frames.length; relwin(window.frames[i++]));
+        if(document.all) {
+            for (var i = 0; i < window.frames.length; relwin(window.frames[i++]));
+        }
         Dialog._modal = null;
     };
 };