ios: fix scrolling on iPhone ios 13

This commit is contained in:
bordun 2020-07-27 14:05:56 +02:00
parent f8925bf7ef
commit 395f3e25c7
2 changed files with 10 additions and 1 deletions

View file

@ -1,9 +1,13 @@
// Prevent iOS Pull-To-Refresh
var iOS13 = navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1,
var iOS13 = (
navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 // iPad
|| navigator.userAgent.match(/iPhone OS 13/) // iPhone
),
iOS = navigator.platform.match(/iPhone|iPod|iPad/) || iOS13
if (iOS && !iOS13) {
// prevent overscroll
// breaks scrolling on iOS13 (besides it doesn't seem to be needed)