javascript MDL-26098 close_window and close_window_reloading_opener were both broken.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Sat, 29 Jan 2011 13:55:47 +0000 (13:55 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Sat, 29 Jan 2011 13:55:47 +0000 (13:55 +0000)
lib/javascript-static.js

index a60ddaf..184ef84 100644 (file)
@@ -1058,7 +1058,7 @@ function close_window(e) {
     } else {
         e.returnValue = false;
     }
-    self.close();
+    window.close();
 }
 
 /**
@@ -1067,7 +1067,7 @@ function close_window(e) {
 function close_window_reloading_opener() {
     if (window.opener) {
         window.opener.location.reload(1);
-        close_window();
+        close_window({});
         // Intentionally, only try to close the window if there is some evidence we are in a popup.
     }
 }