You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2014/01/16 11:53:29 UTC

[06/12] git commit: WICKET-5469 ModalWindow unload warning always displayed (even if window is closed)

WICKET-5469 ModalWindow unload warning always displayed (even if window is closed)

Always reset window.onbeforeunload on close

(cherry picked from commit 0f0be95c81c97d224de5a1b9ec7abc44dc7f149f)


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ca4bfbad
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ca4bfbad
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ca4bfbad

Branch: refs/heads/sandbox/WICKET-4441-create-new-page-hybrid-url-with-different-parameters
Commit: ca4bfbadf0de7f5dd605ac0d78592dea744b4806
Parents: a391ff3
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed Jan 15 11:15:17 2014 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed Jan 15 11:16:04 2014 +0200

----------------------------------------------------------------------
 .../wicket/extensions/ajax/markup/html/modal/res/modal.js    | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/ca4bfbad/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
index 51c4d3c..7a66c92 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
@@ -828,11 +828,9 @@
 			window.onunload = this.old_onunload;
 			this.old_onunload = null;
 
-			if (this.old_onbeforeunload) {
-				// restore old beforeunload handler
-				window.onbeforeunload = this.old_onbeforeunload;
-				this.old_onbeforeunload = null;
-			}
+			// restore old beforeunload handler
+			window.onbeforeunload = this.old_onbeforeunload;
+			this.old_onbeforeunload = null;
 
 			// hids and cleanup the mask
 			this.destroyMask();