Alex K wrote:
> Hi Guys, I've suffered IE weird bug:
>
>  this browser sends onmouseout events even if the mouse is actually
> within the scope of the element, this happens when the mouse is over
> the child element. There is a way to solve this, IE send the proper
> event with name 'mouseleave', so my code looks like:
>
> //one more weird IE bug
> var mouse_out_event_name =
> Prototype.Browser.IE?'mouseleave':'mouseout';
> Event.observe(list_item,mouse_out_event_name,this.onmouseout.bindAsEventListener(this));
>
> Just a thought that it can be handled by the lib to save time of other
> folks,
> Thanks,
> Alex
It's been pretty tricky to properly add support for mouseenter and 
mouseleave into the Prototype event system.  There are a few patch 
attempts on the old trac system under this ticket: 
http://dev.rubyonrails.org/ticket/8354 .

Until then, I use a short script that adds two functions 
Function#bindAsMouseEnter and Function#bindAsMouseLeave that work like 
Function#bindAsEventListener but change the function to only fire on 
mouseenter/mouseleave. Here is the demo and source: 
http://kendsnyder.com/sandbox/enterleave/

BTW, this is not a bug--it is desired behavior, but it is somewhat 
perplexing in most situations.

- Ken Snyder

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to