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/15 10:16:00 UTC
git commit: WICKET-5469 ModalWindow unload warning always displayed
(even if window is closed)
Updated Branches:
refs/heads/wicket-6.x 3fca3415b -> 0f0be95c8
WICKET-5469 ModalWindow unload warning always displayed (even if window is closed)
Always reset window.onbeforeunload on close
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/0f0be95c
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/0f0be95c
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/0f0be95c
Branch: refs/heads/wicket-6.x
Commit: 0f0be95c81c97d224de5a1b9ec7abc44dc7f149f
Parents: 3fca341
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:15:17 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/0f0be95c/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 a00e4d6..f3e51c8 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
@@ -834,11 +834,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();