ios: fix ios13 detection with chrome user agent (fixes scrolling)

This commit is contained in:
bordun 2021-03-21 19:13:02 +01:00
parent 92e46402ad
commit d15bb0ea32
3 changed files with 5 additions and 3 deletions

View file

@ -1,8 +1,9 @@
// Prevent iOS Pull-To-Refresh
var iOS13 = (
navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 // iPad
navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 // safari iPad
|| navigator.userAgent.match(/iPhone OS (1[3-9])/) // iPhone
|| navigator.userAgent.match(/i(Pad|Phone); CPU OS 1[3-9]/) // chrome iPad
) ? 13 : 0,
iOS = iOS13 || navigator.platform.match(/iPhone|iPod|iPad/)