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.