You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by al...@apache.org on 2007/03/07 20:46:20 UTC

svn commit: r515717 - /incubator/wicket/branches/wicket-1.x/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js

Author: almaw
Date: Wed Mar  7 11:46:20 2007
New Revision: 515717

URL: http://svn.apache.org/viewvc?view=rev&rev=515717
Log:
Fix for FF DOM issue on Linux.

Modified:
    incubator/wicket/branches/wicket-1.x/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js

Modified: incubator/wicket/branches/wicket-1.x/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js?view=diff&rev=515717&r1=515716&r2=515717
==============================================================================
--- incubator/wicket/branches/wicket-1.x/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js (original)
+++ incubator/wicket/branches/wicket-1.x/wicket-extensions/src/main/java/wicket/extensions/ajax/markup/html/modal/res/modal.js Wed Mar  7 11:46:20 2007
@@ -435,7 +435,15 @@
 		
 			title: null, /* window title. if null and window content is iframe, title of iframe document will be used. */
 		
-			onCloseButton: function() { this.close(); }.bind(this), /* called when close button is clicked */
+			onCloseButton: function() {
+				/* On firefox on Linux, at least, we need to blur() textfields, etc.
+				 * to get it to update its DOM model. Otherwise you'll lose any changes
+				 * made to the current form component you're editing.
+				 */ 
+				this.caption.getElementsByTagName("a")[0].focus();
+				this.caption.getElementsByTagName("a")[0].blur();
+				this.close();
+			}.bind(this), /* called when close button is clicked */
 			
 			onClose: function() { }, /* called when window is closed */