Monday, August 2, 2010

Re: Browser Event Propagation

In browsers that don't support the W3C event model, you'll need to
return false instead.

(Also, to be clear, event.preventDefault() prevents the default
browser action from happening, e.g. following a link that was clicked.
event.stopPropagation() is what stops the event from bubbling through
the DOM tree.)

On Aug 2, 9:43 am, magat <mathieu.a...@gmail.com> wrote:
> Hi,
>
> I'm currently trying to set up a contextual menu on my gwt app, that
> is open a MenuBar in a PopupPanel on right-click. Using
> event.preventDefault() seems to stop the event propagation in my
> browser (Firefox 3.6) : my menu is displayed, not the browser one.
>
> I'm wondering if this behaviour was browser-specific ?  I can't help
> but thinking that the event propagation may be different on another
> browser. I couldn't find a clear answer in the doc, but maybe I missed
> something.
>
> Thanks for reading this post !
>
> Mathieu AGAR

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment