diff --git a/events.js b/events.js index 24b8311..31d139d 100644 --- a/events.js +++ b/events.js @@ -6,7 +6,7 @@ define([ "./handlers/utils", "./handlers/touch", "./handlers/mouse", - "./handlers/mspointer" + "./handlers/features!mspointer?./handlers/mspointer" ], function (has, utils, touch, mouse, mspointer) { "use strict"; @@ -53,7 +53,7 @@ define([ if (this._targetElement) { touch.deregisterHandlers(this._targetElement); mouse.deregisterHandlers(this._targetElement); - mspointer.deregisterHandlers(this._targetElement); + mspointer && mspointer.deregisterHandlers(this._targetElement); deregisterClickHandler(); } this._targetElement = null; diff --git a/handlers/features.js b/handlers/features.js index 3898b1e..4a698f5 100644 --- a/handlers/features.js +++ b/handlers/features.js @@ -2,7 +2,7 @@ * */ define([ - "../../requirejs-dplugins/has" + "requirejs-dplugins/has" ], function (has) { has.add("touch", "ontouchstart" in document); // UA supports Touch Events has.add("pointer", "onpointerdown" in document); // UA supports Pointer Events