tdf#122359: Un-revert and edit in a attempt to reach a compromise

Change-Id: I0f23c70b3c4a07bae24e490eb8d1a5e56a4ba9ee
diff --git a/loleaflet/js/jquery.mCustomScrollbar.js b/loleaflet/js/jquery.mCustomScrollbar.js
index 442b205..e242263 100644
--- a/loleaflet/js/jquery.mCustomScrollbar.js
+++ b/loleaflet/js/jquery.mCustomScrollbar.js
@@ -2127,8 +2127,7 @@
						// hidden part of the document (for instance when pressing enter on the
						// last visible line). The options.timeout==1 is a silly way to detect
						// the mouse-wheel scrolling.
						if((window.ThisIsAMobileApp && (options.drag || options.timeout===1 || options.calledFromInvalidateCursorMsg==true)) ||
						   (!window.ThisIsAMobileApp)) {
						if(!window.ThisIsAMobileApp || options.drag || options.timeout===1 || options.calledFromInvalidateCursorMsg==true){
							/* callbacks: whileScrolling */
							if(_cb("whileScrolling")){_mcs(); o.callbacks.whileScrolling.call(el[0]);}
						}
diff --git a/loleaflet/src/control/Control.Scroll.js b/loleaflet/src/control/Control.Scroll.js
index e8df36e..829ce18 100644
--- a/loleaflet/src/control/Control.Scroll.js
+++ b/loleaflet/src/control/Control.Scroll.js
@@ -155,11 +155,7 @@

	_onScrollTo: function (e) {
		// triggered by the document (e.g. search result out of the viewing area)
		if (window.ThisIsAMobileApp) {
			$('.scroll-container').mCustomScrollbar('scrollTo', [e.y, e.x], {calledFromInvalidateCursorMsg: e.calledFromInvalidateCursorMsg});
		} else {
			$('.scroll-container').mCustomScrollbar('scrollTo', [e.y, e.x]);
		}
		$('.scroll-container').mCustomScrollbar('scrollTo', [e.y, e.x], {calledFromInvalidateCursorMsg: e.calledFromInvalidateCursorMsg});
	},

	_onScrollBy: function (e) {
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index e48f0f1..7c23669 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1620,11 +1620,7 @@
			if (!(this._selectionHandles.start && this._selectionHandles.start.isDragged) &&
			    !(this._selectionHandles.end && this._selectionHandles.end.isDragged) &&
			    !(docLayer._followEditor || docLayer._followUser)) {
				if (window.ThisIsAMobileApp) {
					this._map.fire('scrollto', {x: center.x, y: center.y, calledFromInvalidateCursorMsg: scroll !== undefined});
				} else {
					this._map.fire('scrollto', {x: center.x, y: center.y});
				}
				this._map.fire('scrollto', {x: center.x, y: center.y, calledFromInvalidateCursorMsg: scroll !== undefined});
			}
		}