Skip to content

Commit

Permalink
Include platform/maxTouchPoints checks for determining platform.mobil…
Browse files Browse the repository at this point in the history
…eSafari flag, see #64
  • Loading branch information
jonathanolson committed Oct 9, 2019
1 parent 9796420 commit 91bb985
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 91bb985

Please sign in to comment.