From d597e4f9a96783f0141dfd99c9ef8be97c847428 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Sun, 27 Jan 2008 14:48:02 +0000 Subject: [PATCH] Because onselectstart is null by default, our logic to set it and replace it was somewhat lacking. This changes the behavior such that using hte drag handler does not totally disable text selection in IE. Patch from Bart, r=me (Closes #906) git-svn-id: http://svn.openlayers.org/trunk/openlayers@5911 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Handler/Drag.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/Handler/Drag.js b/lib/OpenLayers/Handler/Drag.js index e2c111095d..085d4b584d 100644 --- a/lib/OpenLayers/Handler/Drag.js +++ b/lib/OpenLayers/Handler/Drag.js @@ -167,7 +167,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, { OpenLayers.Event.stop(evt); if(!this.oldOnselectstart) { - this.oldOnselectstart = document.onselectstart; + this.oldOnselectstart = (document.onselectstart) ? document.onselectstart : function() { return true; }; document.onselectstart = function() {return false;}; }