summaryrefslogtreecommitdiff
path: root/core/util/browser.js
diff options
context:
space:
mode:
authorSamuel Mannehed <samuel@cendio.se>2019-01-09 13:20:29 +0100
committerSamuel Mannehed <samuel@cendio.se>2019-01-09 14:59:22 +0100
commitef64917a9091a9a12e8245099d6b0b0fbac2f6e5 (patch)
treeec017eaeab6b69aaaf5f6ed2efc433f8c9214b22 /core/util/browser.js
parent47b3eac82bb01518a39a7c69d0e409b3d2812aa1 (diff)
downloadnovnc-ef64917a9091a9a12e8245099d6b0b0fbac2f6e5.tar.gz
Only disable scrollbars on Android and iOSscrollbarsfortouch
Previously scrollbars were disabled on all touch devices. This meant that they were disabled on Windows when touch was detected. Windows does in fact have useful scrollbars even in touch mode. Fixes Issue #1172
Diffstat (limited to 'core/util/browser.js')
-rw-r--r--core/util/browser.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/util/browser.js b/core/util/browser.js
index 088997b..026a31a 100644
--- a/core/util/browser.js
+++ b/core/util/browser.js
@@ -64,6 +64,10 @@ export function isIOS() {
!!(/ipod/i).exec(navigator.platform));
}
+export function isAndroid() {
+ return navigator && !!(/android/i).exec(navigator.userAgent);
+}
+
export function isSafari() {
return navigator && (navigator.userAgent.indexOf('Safari') !== -1 &&
navigator.userAgent.indexOf('Chrome') === -1);