MDL-26337 Improve close_window. Fix bug when $reloadopener is false, and better usability when it is true.
This commit is contained in:
@@ -1061,17 +1061,6 @@ function close_window(e) {
|
||||
window.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the current browser window, forcing the window/tab that opened this
|
||||
* popup to reload itself. */
|
||||
function close_window_reloading_opener() {
|
||||
if (window.opener) {
|
||||
window.opener.location.reload(1);
|
||||
close_window({});
|
||||
// Intentionally, only try to close the window if there is some evidence we are in a popup.
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used in a couple of modules to hide navigation areas when using AJAX
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user