From fde71e7fcc5c84b4441a092261599f845f51ec9b Mon Sep 17 00:00:00 2001 From: Henry Castro Date: Wed, 12 Jun 2019 09:32:51 -0400 Subject: [PATCH] loleaflet: mobile: prevent default action of the 'contextmenu' event Change-Id: I3f991dfc277548e5811c9342edd98775b3d51122 Reviewed-on: https://gerrit.libreoffice.org/77735 Reviewed-by: Henry Castro Tested-by: Henry Castro --- loleaflet/src/map/handler/Map.TouchGesture.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js b/loleaflet/src/map/handler/Map.TouchGesture.js index 9c367daa8..c5735c670 100644 --- a/loleaflet/src/map/handler/Map.TouchGesture.js +++ b/loleaflet/src/map/handler/Map.TouchGesture.js @@ -58,6 +58,8 @@ L.Map.TouchGesture = L.Handler.extend({ L.DomEvent.on(document, L.Draggable.END[events], this._onDocUp, this); } + L.DomEvent.on(document, 'contextmenu', L.DomEvent.preventDefault); + /// $.contextMenu does not support touch events so, /// attach 'touchend' menu clicks event handler if (this._hammer.input instanceof Hammer.TouchInput) {