Handling mouse events in capture phase

2014-05-09 Thread Nuno R
Hi.

Is there a GWT API to add an event handler to a widget in the capture 
phase? 
The equivalent to the following javascript:

target.addEventListener('touchstart', handler, true);

I know of Event.addNativePreviewHandler() but do not think that it fits 
easily to my use case (without handle every single event in the application)
** I want to catch mouse events on a parent widget and avoid to target 
child ones and still be able to normally handle mouse events on other 
widgets in the screen.*

Best regards,
Nuno Rosa

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Handling mouse events in capture phase

2014-05-09 Thread Thomas Broyer


On Friday, May 9, 2014 11:42:15 AM UTC+2, Nuno R wrote:

 Hi.

 Is there a GWT API to add an event handler to a widget in the capture 
 phase? 


No. This is because historically there was no capture phase in IE so it 
couldn't be implemented in a cross-browser way.
This is still the case in IE8, but as soon as we stop supporting it we'll 
be able to add such an API.
If you don't need to support IE8, then you can use JSNI or Elemental.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.