Hi 

Apparently my previous mail is lost, so here I come with the solution : if 
you have long page and the autocomplete doesn't work when you scroll, 
misplaced div, below you will find a ugly patch to fix it 


Have a nice day


Dany



diff --git a/html/js/prototype.js b/html/js/prototype.js
index 37dd39a..eab8e03 100644
--- a/html/js/prototype.js
+++ b/html/js/prototype.js
@@ -4229,8 +4229,27 @@ Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
 
     if (options.setLeft)
       styles.left = (p[0] - delta[0] + options.offsetLeft) + 'px';
-    if (options.setTop)
-      styles.top  = (p[1] - delta[1] + options.offsetTop)  + 'px';
+   if (options.setTop) {
+       /****
+        * Fix Scroll issue
+        */
+                var x = 0, y = 0;
+                if( typeof( window.pageYOffset ) == 'number' ) {
+                    // Netscape
+                    x = window.pageXOffset;
+                    y = window.pageYOffset;
+                } else if( document.body && ( document.body.scrollLeft || 
document.body.scrollTop ) ) {
+                    // DOM
+                    x = document.body.scrollLeft;
+                    y = document.body.scrollTop;
+                } else if( document.documentElement && ( 
document.documentElement.scrollLeft || document.documentElement.scrollTop ) 
) {
+                    // IE6 standards compliant mode
+                    x = document.documentElement.scrollLeft;
+                    y = document.documentElement.scrollTop;
+                }
+      /**** scroll issue ***/
+      styles.top  = (p[1] - delta[1] + options.offsetTop) + y + 'px';
+  }
 
     if (options.setWidth)
       styles.width  = layout.get('border-box-width')  + 'px';

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prototype-scriptaculous+unsubscr...@googlegroups.com.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.

Reply via email to