From 79b3ee420f46d964b796adc06b4cd64e74a44cb8 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Sat, 23 Oct 2010 12:03:17 -0400 Subject: [PATCH] IE version --- dygraph.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); -- 2.7.4