[richfaces-svn-commits] JBoss Rich Faces SVN: r12184 - trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Fri Jan 9 15:29:30 EST 2009


Author: nbelaevski
Date: 2009-01-09 15:29:30 -0500 (Fri, 09 Jan 2009)
New Revision: 12184

Modified:
   trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
https://jira.jboss.org/jira/browse/RF-5620

Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js	2009-01-09 19:40:26 UTC (rev 12183)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js	2009-01-09 20:29:30 UTC (rev 12184)
@@ -412,9 +412,14 @@
 	formElements: "|a|input|select|button|textarea|",
 	
 	processAllFocusElements: function(root, callback) {
-		if (root.focus && root.nodeType == 1 && root.tagName &&
+		var idx = -1;
+		var tagName;
+		
+		if (root.focus && root.nodeType == 1 && (tagName = root.tagName) &&
 			// Many not visible elements have focus method, we is had to avoid processing them.
-			this.formElements.indexOf(root.tagName.toLowerCase())!=-1 &&
+			(idx = this.formElements.indexOf(tagName.toLowerCase())) != -1 &&
+			this.formElements.charAt(idx - 1) === '|' && 
+			this.formElements.charAt(idx + tagName.length) === '|' &&
 			!root.disabled && root.type!="hidden") {
 				callback.call(this, root);
 		} else {




More information about the richfaces-svn-commits mailing list