Skip to content

Commit 8a16088

Browse files
authored
Merge pull request openlayers#1511 from dracos/pointed-fix
Only register one type of pointer/touch handler.
2 parents bf1bdb1 + 4630fe8 commit 8a16088

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/OpenLayers/Events.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,12 +673,12 @@ OpenLayers.Events = OpenLayers.Class({
673673
for (var i = 0, len = this.BROWSER_EVENTS.length; i < len; i++) {
674674
type = this.BROWSER_EVENTS[i];
675675
// register the event cross-browser
676-
OpenLayers.Event.observe(element, type, this.eventHandler
677-
);
678676
if ((touchModel === this.TOUCH_MODEL_POINTER ||
679677
touchModel === this.TOUCH_MODEL_MSPOINTER) &&
680678
type.indexOf('touch') === 0) {
681679
this.addPointerTouchListener(element, type, this.eventHandler);
680+
} else {
681+
OpenLayers.Event.observe(element, type, this.eventHandler);
682682
}
683683
}
684684
// disable dragstart in IE so that mousedown/move/up works normally

theme/default/style.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ div.olMap {
33
padding: 0 !important;
44
margin: 0 !important;
55
cursor: default;
6+
-ms-touch-action: none;
7+
touch-action: none;
68
}
79

810
div.olMapViewport {
911
text-align: left;
10-
-ms-touch-action: none;
1112
}
1213

1314
div.olLayerDiv {

0 commit comments

Comments
 (0)