Forbid right click to trigger singleclick events on IE10

This commit is contained in:
Olivier Terral
2013-11-01 16:27:48 +01:00
parent d0b0d0470b
commit 726a04ce3e

View File

@@ -346,7 +346,10 @@ ol.MapBrowserEventHandler.prototype.handlePointerUp_ = function(browserEvent) {
ol.MapBrowserEvent.EventType.TOUCHEND, this.map_, browserEvent);
this.dispatchEvent(newEvent);
goog.array.forEach(this.dragListenerKeys_, goog.events.unlistenByKey);
if (!this.dragged_) {
// We emulate click event only on mouse left button action,
// on touch devices isMouseActionButton always returns true.
if (!this.dragged_ && browserEvent.isMouseActionButton()) {
goog.asserts.assert(!goog.isNull(this.down_));
this.emulateClick_(this.down_);
}