From: Dan Vanderkam Date: Sat, 23 Oct 2010 15:55:01 +0000 (-0400) Subject: prevent highlighting of text on page X-Git-Tag: v1.0.0~618 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=9922a600c3cc88246729cb13cbd198e4729b77da;p=dygraphs.git prevent highlighting of text on page --- diff --git a/dygraph.js b/dygraph.js index 650d317..483cf7e 100644 --- a/dygraph.js +++ b/dygraph.js @@ -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);