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

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Fri Aug 7 12:10:17 UTC 2020


 loleaflet/js/global.js |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 6d67da6669dfe8002cb58300ccdbf12e852b2d19
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Aug 7 13:49:32 2020 +0200
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Aug 7 14:09:59 2020 +0200

    android: Chromebook is not a touch device, avoid using Hammer there.
    
    This fixes the mouse wheel - now it works on the chromebooks.
    
    Change-Id: I5bf2a7e1ae397ef171221ac58172940bb43cbb3c
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100227
    Tested-by: Jenkins
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js
index 61c7fedde..0b39b8d21 100644
--- a/loleaflet/js/global.js
+++ b/loleaflet/js/global.js
@@ -34,8 +34,10 @@
 	    gecko3d = 'MozPerspective' in doc.style,
 	    opera12 = 'OTransition' in doc.style;
 
+	var chromebook = window.ThisIsTheAndroidApp && window.LOOLMessageHandler.isChromeOS();
+
 	var touch = !window.L_NO_TOUCH && (pointer || 'ontouchstart' in window ||
-			(window.DocumentTouch && document instanceof window.DocumentTouch));
+			(window.DocumentTouch && document instanceof window.DocumentTouch)) && !chromebook;
 
 	var isInternetExplorer = (navigator.userAgent.toLowerCase().indexOf('msie') != -1 ||
 			navigator.userAgent.toLowerCase().indexOf('trident') != -1);
@@ -160,10 +162,7 @@
 
 	global.mode = {
 		isChromebook: function() {
-			if (!window.ThisIsTheAndroidApp)
-				return false;
-
-			return window.LOOLMessageHandler.isChromeOS();
+			return chromebook;
 		},
 		// Here "mobile" means "mobile phone" (at least for now). Has to match small screen size
 		// requirement.


More information about the Libreoffice-commits mailing list