Your solution works indeed but in the end I decided to override the onBrowser event with a first filter to check for click on images.
Thanks again for helping out.

El 19/11/2012 23:43, Thomas Broyer escribió:


On Monday, November 19, 2012 10:34:37 PM UTC+1, Thomas Lefort wrote:

    Thanks Thomas. Unfortunately i cannot prevent the use of
    addDomHandler on the widget.


Well, because the image is a child widget, you can stopPropagation() from your handler to prevent the click to bubble up to your widget; and delegate the event to the handlers otherwise, or something like that.

The thing is: you cannot prevent "other handlers" on the same widget to be triggered from within a handler, so you have to split those handlers in two buckets.

Or possibly wrap the "external" handlers into ones that check a flag in the widget to conditionally delegate to the "real" handler, and have the first ("internal") handler set that flag; but IMO using two buckets is the cleanest solution.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/KrJxSNQRbiEJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

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

Reply via email to