[richfaces-svn-commits] JBoss Rich Faces SVN: r3154 - branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Sep 27 13:25:39 EDT 2007


Author: maksimkaszynski
Date: 2007-09-27 13:25:39 -0400 (Thu, 27 Sep 2007)
New Revision: 3154

Modified:
   branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
http://jira.jboss.com/jira/browse/RF-1022

Modified: branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js	2007-09-27 17:16:05 UTC (rev 3153)
+++ branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js	2007-09-27 17:25:39 UTC (rev 3154)
@@ -153,6 +153,17 @@
         this.upDown = 0;
     },
 
+    preventBlur:function(event) {
+			Event.stop(event);
+	},
+    
+    preventBlurByScroll: function() {
+		Event.observe(this.update, "click", this.preventBlur);
+    }, 
+    
+    enableBlurByScroll: function() {
+		Event.stopObserving(this.update, "click", this.preventBlur);
+    },
     show: function() {
 		if ("SAFARI" == RichFaces.navigatorType()) {
 			this.wasScroll = false;
@@ -164,6 +175,7 @@
         if (Element.getStyle(this.update, 'display')
                 == 'none') this.options.onShow(this.element, this.update, this.options);
         this.disableSubmit();
+	this.preventBlurByScroll();
 
     },
 
@@ -176,6 +188,7 @@
 			Event.stopObserving(this.overflow, "scroll", this.onScrollListener)
 		}
         this.stopIndicator();
+	this.enableBlurByScroll();
         if (Element.getStyle(this.update, 'display')
                 != 'none') this.options.onHide(this.element, this.update, this.options);
         this.enableSubmit();




More information about the richfaces-svn-commits mailing list