Skip to content

Commit eb3e1f3

Browse files
committed
Disable ScrollTimeline in Safari
1 parent 56408a5 commit eb3e1f3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

fixtures/view-transition/src/components/SwipeRecognizer.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ export default function SwipeRecognizer({
2525
if (activeGesture.current !== null) {
2626
return;
2727
}
28-
if (typeof ScrollTimeline !== 'function') {
28+
29+
const ua = navigator.userAgent;
30+
const supportsScrollTimeline =
31+
typeof ScrollTimeline === 'function' &&
32+
(ua.indexOf('Safari') === -1 ||
33+
(ua.indexOf('iPhone') === -1 && ua.indexOf('iPad') === -1));
34+
if (!supportsScrollTimeline) {
35+
// TODO: Polyfill
2936
return;
3037
}
3138
// eslint-disable-next-line no-undef

0 commit comments

Comments
 (0)