Fix web carousel horizontal swipe triggering browser back/forward (#10718)

Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
Spence Pope
2026-06-04 12:23:16 -04:00
committed by GitHub
parent 795d493dea
commit d3c9ed027c
2 changed files with 58 additions and 0 deletions
+5
View File
@@ -343,6 +343,11 @@ export function Gallery({
marginLeft: -insetLeft,
width,
},
// Prevent horizontal trackpad/wheel swipes from triggering the
// browser's back/forward overscroll-navigation gesture. Handles
// Chrome and Firefox; Safari is handled via the wheel listener in
// usePointerHandlers.web.ts since it ignores overscroll-behavior.
web({overscrollBehaviorX: 'contain'}),
]}
contentContainerStyle={{
gap: ITEM_GAP,