From: Dan Vanderkam Date: Sat, 23 Oct 2010 16:03:17 +0000 (-0400) Subject: IE version X-Git-Tag: v1.0.0~617 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=79b3ee420f46d964b796adc06b4cd64e74a44cb8;p=dygraphs.git IE version --- diff --git a/dygraph.js b/dygraph.js index 483cf7e..b909aa7 100644 --- a/dygraph.js +++ b/dygraph.js @@ -843,7 +843,14 @@ 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. + // prevents mouse drags from selecting page text. + if (event.preventDefault) { + event.preventDefault(); // Firefox, Chrome, etc. + } else { + event.returnValue = false; // IE + event.cancelBubble = true; + } + px = Dygraph.findPosX(self.canvas_); py = Dygraph.findPosY(self.canvas_); dragStartX = getX(event);