Remove mousedown listener on first touchstart

This commit is contained in:
Éric Lemoine
2013-10-29 16:08:38 +01:00
parent 9f7ead5ef4
commit 0fa66cc7e7

View File

@@ -266,6 +266,10 @@ ol.MapBrowserEventHandler.prototype.handleMouseMove_ = function(browserEvent) {
* @private
*/
ol.MapBrowserEventHandler.prototype.handleTouchStart_ = function(browserEvent) {
if (!goog.isNull(this.mousedownListenerKey_)) {
goog.events.unlistenByKey(this.mousedownListenerKey_);
this.mousedownListenerKey_ = null;
}
// prevent context menu
// When the IE pointer events are used, this prevents a
// 'mousedown' from being fired after this event for the primary