prevent highlighting of text on page
authorDan Vanderkam <danvdk@gmail.com>
Sat, 23 Oct 2010 15:55:01 +0000 (11:55 -0400)
committerDan Vanderkam <danvdk@gmail.com>
Sat, 23 Oct 2010 15:55:01 +0000 (11:55 -0400)
dygraph.js

index 650d317..483cf7e 100644 (file)
@@ -843,6 +843,7 @@ Dygraph.prototype.createDragInterface_ = function() {
 
   // Track the beginning of drag events
   Dygraph.addEvent(this.mouseEventElement_, 'mousedown', function(event) {
+    event.preventDefault();  // prevents mouse drags from selecting page text.
     px = Dygraph.findPosX(self.canvas_);
     py = Dygraph.findPosY(self.canvas_);
     dragStartX = getX(event);