[Android] Fix horizontal swipes being cancelled when leaving bounds (#10712)

This commit is contained in:
Samuel Newman
2026-06-03 23:01:54 +03:00
committed by GitHub
parent 84d1785e12
commit 4367b9d047
+3 -1
View File
@@ -4,6 +4,8 @@ import {Gesture, GestureDetector} from 'react-native-gesture-handler'
export function BlockDrawerGesture({children}: {children: React.ReactNode}) {
const drawerGesture = useContext(DrawerGestureContext) ?? Gesture.Native() // noop for web
const scrollGesture = Gesture.Native().blocksExternalGesture(drawerGesture)
let scrollGesture = Gesture.Native()
.shouldCancelWhenOutside(false) // for some reason defaults to true on Android
.blocksExternalGesture(drawerGesture)
return <GestureDetector gesture={scrollGesture}>{children}</GestureDetector>
}