From 91bb985a5eb37cff9b31836af7ddcace8be32a34 Mon Sep 17 00:00:00 2001 From: Jonathan Olson Date: Wed, 9 Oct 2019 12:27:14 -0600 Subject: [PATCH] Include platform/maxTouchPoints checks for determining platform.mobileSafari flag, see https://github.com/phetsims/phet-core/issues/64 --- js/platform.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/platform.js b/js/platform.js index 9e4122d..ea6b115 100644 --- a/js/platform.js +++ b/js/platform.js @@ -24,7 +24,7 @@ define( require => { // Whether the browser is most likely Safari running on iOS // See http://stackoverflow.com/questions/3007480/determine-if-user-navigated-from-mobile-safari function isMobileSafari() { - return !!( ua.match( /(iPod|iPhone|iPad)/ ) && ua.match( /AppleWebKit/ ) ); + return !!( ( ua.match( /(iPod|iPhone|iPad)/ ) || ( navigator.platform === 'MacIntel' && navigator.maxTouchPoints >= 2 ) ) && ua.match( /AppleWebKit/ ) ); } //IE11 no longer reports MSIE in the user agent string, see https://github.com/phetsims/phet-core/issues/12