From fa5f3723634fd32f6126c54701ecc4637631fed8 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 4 Jun 2026 11:03:03 -0500 Subject: [PATCH] Limit onWheel to Safari --- src/components/images/Gallery/usePointerHandlers.web.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/images/Gallery/usePointerHandlers.web.ts b/src/components/images/Gallery/usePointerHandlers.web.ts index 326d6dd194..ddf9bdf0c6 100644 --- a/src/components/images/Gallery/usePointerHandlers.web.ts +++ b/src/components/images/Gallery/usePointerHandlers.web.ts @@ -4,6 +4,7 @@ import {type FlatList} from 'react-native' import {ITEM_GAP} from '#/components/images/Gallery/const' import {tween} from '#/components/images/Gallery/tween' import {getOffsetForIndex} from '#/components/images/Gallery/utils' +import {IS_WEB_SAFARI} from '#/env' const DRAG_THRESHOLD = 3 const FLICK_DECAY = 0.85 @@ -258,6 +259,7 @@ export function usePointerHandlers({ * Listener must be non-passive so preventDefault is honored. */ const onWheel = (e: WheelEvent) => { + if (!IS_WEB_SAFARI) return // Only act on predominantly-horizontal scrolls. Vertical-dominant events // are page scroll and must not be swallowed. if (Math.abs(e.deltaX) <= Math.abs(e.deltaY)) return