Permalink
Browse files

Attaching listener to document

  • Loading branch information...
1 parent 1a159b1 commit 3fb7424ae5c3acc16a4a8b2afe36b675ed8c923e @beaucollins committed Mar 27, 2013
Showing with 6 additions and 4 deletions.
  1. +6 −4 public/app.js
View
@@ -177,10 +177,12 @@ var Slider = function(frame, options){
document.addEventListener('mousemove', detector);
};
};
-
- document.addEventListener('mousemove', detector);
- document.addEventListener('mousedown', down);
- document.body.addEventListener('mouseup', release);
+
+ if (document.ontouchstart === undefined) {
+ document.addEventListener('mousemove', detector);
+ document.addEventListener('mousedown', down);
+ document.addEventListener('mouseup', release);
+ };
}

0 comments on commit 3fb7424

Please sign in to comment.