[richfaces-svn-commits] JBoss Rich Faces SVN: r5240 - trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Wed Jan 9 14:31:05 EST 2008


Author: vmolotkov
Date: 2008-01-09 14:31:05 -0500 (Wed, 09 Jan 2008)
New Revision: 5240

Modified:
   trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
Log:
component corrected

Modified: trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js	2008-01-09 19:25:25 UTC (rev 5239)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js	2008-01-09 19:31:05 UTC (rev 5240)
@@ -18,6 +18,8 @@
 		
 		this.onselected = onselected;
 		
+		this.isSelection = true;
+		
 		this.initCombobox();
 	},
 	
@@ -72,14 +74,17 @@
 		if (this.field.value == this.defaultMessage) {
 			this.field.value = "";
 		} else {
-			Richfaces.ComboBox.textboxSelect(this.field, 0, this.field.value.length);
+			if (this.isSelection) {
+				Richfaces.ComboBox.textboxSelect(this.field, 0, this.field.value.length);
+			}
+			this.isSelection = true;
 		}
 	},
 	
 	valueHandler : function(event) {
+		this.isSelection = false;
 		this.field.focus();
 		this.setValue(true);
-		
 		this.comboList.hide();
 	},
 	




More information about the richfaces-svn-commits mailing list