react-native-pull-refresh icon indicating copy to clipboard operation
react-native-pull-refresh copied to clipboard

Taps on List Items when scroll is at the very top do not trigger onPress events in the children

Open duro opened this issue 7 years ago • 3 comments

But as soon as I scroll even a little bit down, taps will trigger onPress in the children?

Any idea what could cause those events in children not to fire?

duro avatar Apr 26 '18 02:04 duro

@duro did you end up figuring out why this is? Having the exact same problem

WillKre avatar May 28 '18 19:05 WillKre

Had the same issue, found out that

_handleMoveShouldSetPanResponder(e, gestureState) {
   return !this.state.isScrollFree;
}

is preventing the onPress event to trigger

What I did is modifying the function to check if dx/dy are not 0

_handleMoveShouldSetPanResponder(e, gestureState) {
  return !(gestureState.dx === 0 && gestureState.dy === 0) && !this.state.isScrollFree;
}

Not sure if it's the right way to handle this, but it seems to work for now !

LimAlbert avatar Nov 04 '18 16:11 LimAlbert

Thanks a lot @LimAlbert ! It work

Nezran avatar Feb 13 '19 10:02 Nezran