How to bind Touch Events with GWTQuery?
To bind events like click with GQuery you can do something like:
@UiField
Element myButton;
...
$(myButton).on("click", new Function() {
@Override
public void f() {
// event is triggered
}
}
What I need is support for touch events like Tap as it was implemented in MGWT. In MGWT you can use a TouchPanel to get a tap event like this:
@UiField
TouchPanel panel;
...
panel.addTapHandler(...);
Is there a way to bind a tap event with GQuery as it is done for the TouchPanel?
I'm not sure if it will work but, GQuery uses browser native events. Tap event is "tap" and you should be able to bind on it.
@christiangoudreau is "tap" without the 300ms delay?
Okay, it seems like if "tap" isn't a native event. +1 for GQuery-Mobile then! :D
@christiangoudreau Could you please post a link of GQuery-Mobile? Or is it still a dream? :-)
Not a dream, but a requested feature that we should definitely work on!
That would be great. Is there some workaround for the moment?
You could probably look at gesture events instead: http://www.html5rocks.com/en/mobile/touch/#toc-events
Touch events is probably what you're looking for (touch start, touch ends and starting a timer on touch start of 300ms, stoping it if you reach 300ms or on touch end)
Im working on a gestures plugin for gquery I'll post about it when release it
On Sat, Dec 13, 2014, 9:21 PM christiangoudreau [email protected] wrote:
You could probably look at gesture events instead: http://www.html5rocks.com/en/mobile/touch/#toc-events
Touch events is probably what you're looking for (touch start, touch ends and starting a timer on touch start of 300ms, stoping it if you reach 300ms or on touch end)
— Reply to this email directly or view it on GitHub https://github.com/ArcBees/gwtquery/issues/318#issuecomment-66889826.
@manolo When will you release it?
Before gwt.create On Dec 13, 2014 11:16 PM, "Confile" [email protected] wrote:
@manolo https://github.com/manolo When will you release it?
— Reply to this email directly or view it on GitHub https://github.com/ArcBees/gwtquery/issues/318#issuecomment-66893709.
So before Jan 2015 which means this month.