You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jc...@apache.org on 2007/03/01 21:36:14 UTC

svn commit: r513489 - /incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js

Author: jcompagner
Date: Thu Mar  1 12:36:13 2007
New Revision: 513489

URL: http://svn.apache.org/viewvc?view=rev&rev=513489
Log:
test around the focus setting (thx matej!)

Modified:
    incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js

Modified: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js?view=diff&rev=513489&r1=513488&r2=513489
==============================================================================
--- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js (original)
+++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/ajax/wicket-ajax.js Thu Mar  1 12:36:13 2007
@@ -1410,11 +1410,10 @@
 	{
 		for (var i=0; i< elements.length; i++)
 		{
-		// do it for all elements even without id. then those will set the focus
-		// but then the focus can't be set back (but also don't get set to the last one with id.
-//		    if ( typeof(elements[i].id) != "undefined")
+		    if ( typeof(elements[i].focusSet) == "undefined")
 		    {
 		         Wicket.Event.add(elements[i],'focus',Wicket.Focus.setFocus);
+		         elements[i].focusSet = true;
 		    }
 		}
 	},