#652 - IE was pretending it didn't know about document.onselectstart - though it relies on it

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3039 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2007-04-09 20:15:19 +00:00
parent fc9bbae52e
commit 6ffc672436

View File

@@ -76,11 +76,9 @@ OpenLayers.Handler.Drag.prototype = OpenLayers.Class.inherit( OpenLayers.Handler
if (this.started) {
this.dragging = true;
this.callback("move", [evt.xy]);
if(document.onselectstart) {
if(!this.oldOnselectstart) {
this.oldOnselectstart = document.onselectstart;
document.onselectstart = function() {return false;}
}
if(!this.oldOnselectstart) {
this.oldOnselectstart = document.onselectstart;
document.onselectstart = function() {return false;}
}
}
return true;
@@ -99,9 +97,7 @@ OpenLayers.Handler.Drag.prototype = OpenLayers.Class.inherit( OpenLayers.Handler
// TBD replace with CSS classes
this.map.div.style.cursor = "default";
this.callback("up", [evt.xy]);
if(document.onselectstart) {
document.onselectstart = this.oldOnselectstart;
}
document.onselectstart = this.oldOnselectstart;
}
return true;
},