[richfaces-svn-commits] JBoss Rich Faces SVN: r1010 - trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Jun 5 04:50:48 EDT 2007


Author: a.izobov
Date: 2007-06-05 04:50:48 -0400 (Tue, 05 Jun 2007)
New Revision: 1010

Modified:
   trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
http://jira.jboss.com/jira/browse/RF-252 fixed

Modified: trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js	2007-06-05 01:17:52 UTC (rev 1009)
+++ trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js	2007-06-05 08:50:48 UTC (rev 1010)
@@ -356,15 +356,10 @@
                     LOG.debug("Scroll = " + scroll.scrollTop
                             + " , reallOffset= " + realOffset
                             + " scrollHeight= " + scroll.offsetHeight);
-                    var minScroll = realOffset - (scroll.clientHeight / 2)
-                            - (scroll.clientHeight / 2) % entry.offsetHeight;
-                    var maxScroll = realOffset - (scroll.clientHeight * 2 / 3)
-                            + (scroll.clientHeight * 2 / 3)
-                            % (entry.offsetHeight) ;
-                    if (scroll.scrollTop > minScroll) {
-                        scroll.scrollTop = minScroll;
-                    } else if (scroll.scrollTop < maxScroll) {
-                        scroll.scrollTop = maxScroll;
+                    if (realOffset > scroll.scrollTop + scroll.clientHeight - entry.offsetHeight) {
+                    	scroll.scrollTop = realOffset - scroll.clientHeight + entry.offsetHeight;
+                    } else if (realOffset < scroll.scrollTop) {
+                    	scroll.scrollTop = realOffset;
                     }
                 }
                 // remove hightliit from inactive entry




More information about the richfaces-svn-commits mailing list