[Libreoffice-commits] online.git: loleaflet/src

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Sun Feb 23 21:05:07 UTC 2020


 loleaflet/src/map/handler/Map.TouchGesture.js |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit ac961d7b67fcb5fb97cb6a620c913debb74ba8c1
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun Feb 23 13:42:26 2020 -0500
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Sun Feb 23 22:04:48 2020 +0100

    leaflet: don't process multi-taps as single-tap
    
    Change-Id: Ifaad116c5c6fb34ac40a12113a1d3b7532a8d7ac
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89311
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js b/loleaflet/src/map/handler/Map.TouchGesture.js
index c0d4bb4ce..849f64d69 100644
--- a/loleaflet/src/map/handler/Map.TouchGesture.js
+++ b/loleaflet/src/map/handler/Map.TouchGesture.js
@@ -302,6 +302,20 @@ L.Map.TouchGesture = L.Handler.extend({
 	},
 
 	_onTap: function (e) {
+
+		// We receive each tap here, even when double- and triple-taps
+		// are detected. This is undesirable as the subsequent taps
+		// processed here interfere with the double- and triple-tap
+		// handlers, confusing Core (and the user) as the result
+		// is not what's expected (objects not getting selected,
+		// edit mode not entered, or toggled, keyboard toggles, etc.).
+		// We only process the first tap and subsequent ones are handled
+		// by the double-tap and triple-tap handlers below.
+		// Note: Hammer has requireFailure() which supressses this call
+		// when multi-taps are detected. This isn't working for us.
+		if (e.tapCount > 1)
+			return;
+
 		var point = e.pointers[0],
 		    containerPoint = this._map.mouseEventToContainerPoint(point),
 		    layerPoint = this._map.containerPointToLayerPoint(containerPoint),


More information about the Libreoffice-commits mailing list