use of com.google.gwt.dom.client.EventTarget in project GwtMobile by dennisjzh.
the class DragControllerMobile method onTouchStart.
public void onTouchStart(TouchEvent e) {
EventTarget target = e.getEventTarget();
boolean preventDefault = true;
if (Element.is(target)) {
Element ele = Element.as(target);
// INPUT element will not get focus if default action is prevented.
if (Utils.isHtmlFormControl(ele)) {
ele.focus();
preventDefault = false;
}
}
if (preventDefault) {
// prevent default action of selecting text
e.preventDefault();
e.stopPropagation();
}
// FIXME: for multi-touch platforms.
onStart(e, new Point(e.touches().get(0).getClientX(), e.touches().get(0).getClientY()));
}
Aggregations