OpenLayers OpenLayers

Ticket #792: onselectstart_drag_handler.patch.txt

File onselectstart_drag_handler.patch.txt, 0.7 kB (added by pgiraud, 1 year ago)
Line 
1 Index: /home/pierre/public_html/openlayers/lib/OpenLayers/Handler/Drag.js
2 ===================================================================
3 --- /home/pierre/public_html/openlayers/lib/OpenLayers/Handler/Drag.js  (revision 3558)
4 +++ /home/pierre/public_html/openlayers/lib/OpenLayers/Handler/Drag.js  (working copy)
5 @@ -69,6 +69,12 @@
6              this.map.div.style.cursor = "move";
7              this.callback("down", [evt.xy]);
8              OpenLayers.Event.stop(evt);
9 +           
10 +            if(!this.oldOnselectstart) {
11 +                this.oldOnselectstart = document.onselectstart;
12 +                document.onselectstart = function() {return false;}
13 +            }
14 +           
15              return false;
16          }
17          return true;