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: .

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:

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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at

Reply via email to