We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b81ba65 commit cfa0832Copy full SHA for cfa0832
interact.js
@@ -284,6 +284,11 @@
284
supportsTouch &&
285
navigator.userAgent.match('Presto'),
286
287
+ // scrolling doesn't change the result of
288
+ // getBoundingClientRect/getClientRects on iOS <=7 but it does on iOS 8
289
+ isIOS7orLower = (/iP(hone|od|ad)/.test(navigator.platform)
290
+ && /OS [1-7][^\d]/.test(navigator.appVersion)),
291
+
292
// prefix matchesSelector
293
prefixedMatchesSelector = 'matchesSelector' in Element.prototype?
294
'matchesSelector': 'webkitMatchesSelector' in Element.prototype?
@@ -646,7 +651,7 @@
646
651
}
647
652
648
653
function getElementRect (element) {
649
- var scroll = /ipad|iphone|ipod/i.test(navigator.userAgent)
654
+ var scroll = isIOS7orLower
650
655
? { x: 0, y: 0 }
656
: getScrollXY(),
657
clientRect = (element instanceof SVGElement)?
0 commit comments