my suggestion was to use standard native events in
user code, not custom events in the core:
mouseover (bubbles and is cancelable).
The user should then take care of cancelling the event
himself if he does not use the bubbling phase or if
is disturbing to have ancestors be notified.
On 12 Giu, 12:46, Nick Stakenburg <[EMAIL PROTECTED]> wrote:
> Diego, on IE custom events can't be cancelled. fireEvent will always
> fire an event that
> That's why I'm for making Element#observe handle mouseenter/leave in
> the core. Firing and then filtering custom events goes against the
> point of making this easy to use. These events should not bubble, this
> can't be done with custom events, therefore the observe approach is
> the better one.
> I've been saying this for some time but custom events seem to be used
> as an excuse not to implement this properly, like other frameworks
> have done. Of course it can be done with custom events but it's
> clearly not the best approach. Ah well, I guess this needs more time
> before others draw the same conclusion.
> On 11 jun, 03:08, Diego Perini <[EMAIL PROTECTED]> wrote:
> > I am probably missing something, but...
> > Why not use mouseover / mouseout on all browser and then use
> > "event.stopPropagation()" method or "event.cancelBubble=true" for IE ?
> > Are there browsers where the bubbling phase of these events can't be
> > cancelled ?
> > --
> > Diego Perini
> > On 10 Giu, 21:58, Nick Stakenburg <[EMAIL PROTECTED]> wrote:
> > > Andrew has a script that shows how to do it with custom
> > > It's not as convenient as real mouseenter/mouseleave behaviour,
> > > because these event will bubble. Child elements will fire mouse:enter/
> > > mouse:leave events onto their parent. You'd have to filter out these
> > > unwanted event before this will work.
> > > I'd prefer something similar as the patch Ken posted implemented into
> > > core. It doesn't have the overhead and is much more convenient since
> > > it allows you to do this:
> > > $(element).observe('mouseleave', handler);
> > > jQuery and Mootools use a similar approach. It's much closer to the
> > > spec, since it doesn't involve event bubbling like the real mouseenter/
> > > mouseleave events.
> > > On 10 jun, 21:10, Alex K <[EMAIL PROTECTED]> 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
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to email@example.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at