Skip to content

Commit

Permalink
Conditional loading of mspointer module. Ref ibm-js#4.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Pereira committed Sep 8, 2014
1 parent 72cdb0b commit 6154052
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions events.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion handlers/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6154052

Please sign in to comment.