[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src

Marco Cecchetti (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 3 12:26:00 UTC 2019


 loleaflet/src/map/handler/Map.TouchGesture.js |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 915dd86b97114c2cbbcd6b2b9b91537fd328cc3a
Author:     Marco Cecchetti <marco.cecchetti at collabora.com>
AuthorDate: Thu Oct 3 14:24:08 2019 +0200
Commit:     Marco Cecchetti <marco.cecchetti at collabora.com>
CommitDate: Thu Oct 3 14:25:41 2019 +0200

    loleaflet: tdf#127671 - follow up
    
    Better be sure that the toolbar exists.
    Reported problem: no scroll in an empty spreadsheet.
    
    Change-Id: If2cc3b540bde1558d5839082552499f185586ed7
    Reviewed-on: https://gerrit.libreoffice.org/80127
    Reviewed-by: Marco Cecchetti <marco.cecchetti at collabora.com>
    Tested-by: Marco Cecchetti <marco.cecchetti at collabora.com>

diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js b/loleaflet/src/map/handler/Map.TouchGesture.js
index 5d143f3f4..b94e05330 100644
--- a/loleaflet/src/map/handler/Map.TouchGesture.js
+++ b/loleaflet/src/map/handler/Map.TouchGesture.js
@@ -303,8 +303,10 @@ L.Map.TouchGesture = L.Handler.extend({
 		    mousePos = this._map._docLayer._latLngToTwips(latlng);
 
 		if (window.ThisIsTheiOSApp) {
-			this._toolbar.remove();
-			this._toolbarAdded = null;
+			if (this._toolbarAdded) {
+				this._toolbar.remove();
+				this._toolbarAdded = null;
+			}
 		}
 		this._map._contextMenu._onMouseDown({originalEvent: e.srcEvent});
 		this._map._docLayer._postMouseEvent('buttondown', mousePos.x, mousePos.y, 1, 1, 0);
@@ -385,7 +387,8 @@ L.Map.TouchGesture = L.Handler.extend({
 		    mousePos = this._map._docLayer._latLngToTwips(latlng);
 
 		if (window.ThisIsTheiOSApp) {
-			this._toolbar.hide();
+			if (this._toolbar.isVisible())
+				this._toolbar.hide();
 		}
 
 		var originalCellCursor = this._map._docLayer._cellCursor;
@@ -487,7 +490,8 @@ L.Map.TouchGesture = L.Handler.extend({
 			this._pinchStartCenter = {x: e.center.x, y: e.center.y};
 		}
 		if (window.ThisIsTheiOSApp) {
-			this._toolbar.hide();
+			if (this._toolbar.isVisible())
+				this._toolbar.hide();
 		}
 	},
 
@@ -532,7 +536,8 @@ L.Map.TouchGesture = L.Handler.extend({
 	},
 
 	_onInputDragStartiOSOnly: function () {
-		this._toolbar.hide();
+		if (this._toolbar.isVisible())
+			this._toolbar.hide();
 		// not set this._toolbarAdded to null it's checked on drag end
 	},
 


More information about the Libreoffice-commits mailing list