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
This commit is contained in:
crschmidt
2008-01-27 14:48:02 +00:00
parent ea5e96df85
commit d597e4f9a9

View File

@@ -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;};
}