Skip to content

Commit fbcec20

Browse files
author
William Seow
committed
make sure move responder is set only when gesture is moving vertically with right velocity
1 parent b241eff commit fbcec20

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/RefreshControl.web.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export default function RefreshControl({
8080
const containerDOM = findNodeHandle(containerRef.current)
8181
if (!containerDOM) return false
8282
return containerDOM.children[0].scrollTop === 0
83+
&& (Math.abs(gestureState.dy) > Math.abs(gestureState.dx) * 2 && Math.abs(gestureState.vy) > Math.abs(gestureState.vx) * 2.5)
8384
},
8485
onMoveShouldSetPanResponderCapture: () => false,
8586
onPanResponderMove: (_, gestureState) => {

0 commit comments

Comments
 (0)