loleaflet: mobile: prevent default action of the 'contextmenu' event

Change-Id: I3f991dfc277548e5811c9342edd98775b3d51122
Reviewed-on: https://gerrit.libreoffice.org/77735
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
This commit is contained in:
Henry Castro 2019-06-12 09:32:51 -04:00
parent 7af08ddc85
commit fde71e7fcc

View file

@ -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) {