+1
(Tested successfully in IE 6)
On 4/20/06, Tommy Skaue <tommy.skaue@gmail.com>
wrote:>
> Hi everyone
>
> If you've seen this ticket, http://dev.rubyonrails.org/ticket/4782,
> you've noticed I have tried to make scrollable autocompleter work. The
> scrollIntoView works great, however the iframefix for IE didnt work in
> the previous change. This is fixed now.
> Also the "blur-on-scrollbar-click" should not work in both IE and
> Safari (can someone confirm this?)
>
> It all works now in FF and IE, but still not in Opera. I do not have
> access to Safari, so I cannot test it there. Maybe someone else can.
>
> Here is a patch for controls.js (underneath is the patch for the
> testfile).
>
> Index: controls.js
>
> ==================================================================>
> --- controls.js (revision 4240)
>
> +++ controls.js (working copy)
>
> @@ -94,7 +94,7 @@
>
> },
>
> fixIEOverlapping: function() {
> - Position.clone(this.update, this.iefix);
> + Position.clone(this.update, this.iefix,
> {setTop:(!this.update.style.height)});
> this.iefix.style.zIndex = 1;
> this.update.style.zIndex = 2;
> Element.show(this.iefix);
> @@ -176,6 +176,13 @@
>
> },
>
> onBlur: function(event) {
> + // Dont hide the div on "blur" if the user clicks scrollbar
> + if(Element.getStyle(this.update, 'height') != ''){
> + if( Position.within( this.update , Event.pointerX(event) ,
> Event.pointerY(event) ) ){
> + Event.observe(this.update, "blur",
> this.onBlur.bindAsEventListener(this),true); // make sure blur is
> still around on
> + return;
> + }
> + }
> // needed to make click events working
> setTimeout(this.hide.bind(this), 250);
> this.hasFocus = false;
>
>
> Index: ajax_autocompleter2_test.html
>
> ==================================================================>
> --- ajax_autocompleter2_test.html (revision 4240)
>
> +++ ajax_autocompleter2_test.html (working copy)
>
> @@ -72,8 +72,10 @@
>
> new Array("John Jackson", "Jack Johnson", "Jane
Agnews", "Jack
> Johnson", "Jane Agnews", "Jack Johnson",
"Jane Agnews"), { tokens: new
> Array(',','\n'), fullSearch: true, partialSearch: true });
> // ]]>
> </script>
> +<br />
> +Hide these dropdowns
>
>
<select><option> </option></select><select><option> </option></select><select><option> </option></select><select><option> </option></select>underneath
> result from autocompleter:
> +<br />
>
> -
> <br /><br /><br />
> <br /><br /><br />
> <div id="debug"
style="font-size:11px;"></div>
>
>
> /Tommy
> --
> ------------------------------------------
> Gmail rocks!
> I'll invite you on your request :-)
> ------------------------------------------
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs