From 6546a4d0408f0b68e5567233fb34a35b158a75d0 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 17 Dec 2019 19:08:02 +0100 Subject: [PATCH] fix #3246 @0:20 --- js/libs/fluidbook/fluidbook.support.js | 2 +- js/libs/modernizr/tests.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.support.js b/js/libs/fluidbook/fluidbook.support.js index be6a6841..150777a2 100644 --- a/js/libs/fluidbook/fluidbook.support.js +++ b/js/libs/fluidbook/fluidbook.support.js @@ -9,7 +9,7 @@ function FluidbookSupport(fluidbook) { this.macOs = navigator.platform.toUpperCase().indexOf('MAC') >= 0; this.android = this.fitScreenAtZero = this.userAgent.search(/android/i) > -1 || this.userAgent.search(/galaxy/i) > -1; this.android3 = this.android && this.userAgent.search(/android 3/i) > -1; - this.iOS = (/iPad|iPhone|iPod/.test(navigator.platform) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) && !window.MSStream + this.iOS = Modernizr.ios; this.edge = this.userAgent.search(/edge/i) > -1; // If in node-webkit or if the index.html fluidbook is locally open in a browser this.offline = (typeof process !== "undefined" && process.versions['node-webkit']) || window.location.toString().indexOf("file://") == 0; diff --git a/js/libs/modernizr/tests.js b/js/libs/modernizr/tests.js index a28c9725..c4720a91 100644 --- a/js/libs/modernizr/tests.js +++ b/js/libs/modernizr/tests.js @@ -7,7 +7,7 @@ Modernizr.addTest('ftouch', function () { }); Modernizr.addTest('ipad', function () { - return !!navigator.userAgent.match(/iPad/i); + return (!!navigator.userAgent.match(/iPad/i) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) && !window.MSStream; }); Modernizr.addTest('iphone', function () { -- 2.39.5