]> _ Git - fluidbook-html5.git/commitdiff
fix #3246 @0:20
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 17 Dec 2019 18:08:02 +0000 (19:08 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 17 Dec 2019 18:08:02 +0000 (19:08 +0100)
js/libs/fluidbook/fluidbook.support.js
js/libs/modernizr/tests.js

index be6a6841766187eda1072e360307b635d241b2a4..150777a247029b84376dd7c608aa3928d76becd4 100644 (file)
@@ -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;
index a28c972541a01cbea6a86f53f687e0e52cf70084..c4720a918dcfea4d5ebde646f1d90243a891f58c 100644 (file)
@@ -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 () {