diff --git a/events.js b/events.js index 6fc97f5..70e1ea4 100644 --- a/events.js +++ b/events.js @@ -35,7 +35,6 @@ define([ } } } - registerClickHandler(); this._targetElement = targetElement; }; @@ -47,7 +46,6 @@ define([ touch.deregisterHandlers(this._targetElement); mouse.deregisterHandlers(this._targetElement); mspointer && mspointer.deregisterHandlers(this._targetElement); - deregisterClickHandler(); } this._targetElement = null; }; @@ -153,39 +151,6 @@ define([ } } - /** - * register click handler. - */ - function registerClickHandler() { - utils.addEventListener(window.document, "click", clickHandler, true); - } - - /** - * deregister click handler - */ - function deregisterClickHandler() { - utils.removeEventListener(window.document, "click", clickHandler, true); - } - - /** - * handler for Click events. - * - * @param e click event - */ - function clickHandler(e) { - if (has("touch-events")) { - // (7) Android 4.1.1 generates a click after touchend even when touchstart is prevented. - // if we receive a native click at an element with touch action disabled we just have to absorb it. - // (fixed in Android 4.1.2+) - if (utils.isNativeClickEvent(e) && (touch.determineTouchAction(e.target) !== utils.TouchAction.AUTO)) { - e.preventDefault(); - e.stopImmediatePropagation(); - return false; - } - } - return true; - } - // start listening to native events pointerEvents.enable();