You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2010/08/25 07:08:20 UTC
svn commit: r988807 -
/wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
Author: ivaynberg
Date: Wed Aug 25 05:08:20 2010
New Revision: 988807
URL: http://svn.apache.org/viewvc?rev=988807&view=rev
Log:
Closing ModalWindow makes some form fields unclickable
Issue: WICKET-2957
Modified:
wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js?rev=988807&r1=988806&r2=988807&view=diff
==============================================================================
--- wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js (original)
+++ wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js Wed Aug 25 05:08:20 2010
@@ -1264,6 +1264,9 @@ Wicket.Window.Mask.prototype = {
this.dontHide = true;
}
+ this.shown=true;
+ this.focusDisabled=false;
+
this.disableCoveredContent();
},
@@ -1286,7 +1289,10 @@ Wicket.Window.Mask.prototype = {
Wicket.Window.Mask.element = null;
}
+ this.shown=false;
+
this.reenableCoveredContent();
+
},
// disable user interaction for content that is covered by the mask
@@ -1364,6 +1370,10 @@ Wicket.Window.Mask.prototype = {
* have always bigger z-order than any other elements).
*/
hideSelectBoxes : function(doc, win) {
+ if (!this.shown) {
+ return;
+ }
+
if (Wicket.Browser.isIE() && Wicket.Browser.isIE7() == false) {
this.boxes = new Array();
var selects = doc.getElementsByTagName("select");
@@ -1419,6 +1429,9 @@ Wicket.Window.Mask.prototype = {
* Disable focus on all elements in document
*/
disableFocus: function(doc, win) {
+ if (!this.shown) {
+ return;
+ }
// explorer doesn't need this, because for IE disableTabs() is called.
// plus in IE this causes problems because it scrolls document );
if (Wicket.Browser.isIE() == false) {
@@ -1428,12 +1441,17 @@ Wicket.Window.Mask.prototype = {
this.disableFocusElement(body.childNodes[i], this.focusRevertList, win);
}
}
+ this.focusDisabled=true;
},
/**
* Enables focus on all elements where the focus has been disabled.
*/
enableFocus: function() {
+ if (this.focusDisabled==false) {
+ return;
+ }
+
if (typeof(this.focusRevertList) != "undefined") {
for (var i = 0; i < this.focusRevertList.length; ++i) {
var item = this.focusRevertList[i];
@@ -1448,6 +1466,10 @@ Wicket.Window.Mask.prototype = {
* Disable tab indexes (ie).
*/
disableTabs: function (doc, win) {
+ if (!this.shown) {
+ return;
+ }
+
if (typeof (this.tabbableTags) == "undefined") this.tabbableTags = new Array("A","BUTTON","TEXTAREA","INPUT","IFRAME", "SELECT");
if (Wicket.Browser.isIE()) {
this.disabledTabsRevertList = new Array();