react-native-gesture-handler icon indicating copy to clipboard operation
react-native-gesture-handler copied to clipboard

Inverted Flatlist scrolling wrong direction when flicking at bottom

Open hardcodet opened this issue 5 years ago • 4 comments

This may be a regression of https://github.com/software-mansion/react-native-gesture-handler/issues/171

Repro (Android 10):

Scroll to the end (bottom) of an inverted FlatList. When at the end, perform a few flicks further towards the bottom. Expected behavior here is that nothing would happen. What happens though is that the list suddenly scrolls back up.

Workaround: Replacing RNGH FlatList with RN FlatList fixes the issue.

Package versions

RNGH: 1.7.0 Expo SDK 39

hardcodet avatar Oct 13 '20 10:10 hardcodet

Could you please provide some small repro?

jgonet avatar Nov 02 '20 14:11 jgonet

Have the same issue with "react-native-gesture-handler": "^1.8.0" "react-native": "0.63.2"

inverted FlatList from react-native works fine as mentioned above.

code to reproduce:

import React from "react"
import { View } from "react-native"
import { FlatList } from "react-native-gesture-handler"

export const MessageList = () => {
	return (
		<FlatList
			inverted
			data={Array(50).fill(1)}
			renderItem={() => <View style={{ height: 100, backgroundColor: "red" }} />}
		/>
	)
}

illustration what happens (i'm trying to scroll down):

1

kirillpisarev avatar Nov 19 '20 11:11 kirillpisarev

Same issue here like @kirillpisarev

nickksm avatar Dec 07 '20 16:12 nickksm

Hello! Did you manage to resolve this issue? If not, can you please check if this issue still occurs on the latest version of react-native-gesture-handler and some newer version of react-native?

After activation, NativeViewGestureHandler will send touch events directly to ScrollView from react-native so the workaround from https://github.com/facebook/react-native/pull/21117 should be applied automatically. Nevertheless, we will need to delve into this issue.

tomekzaw avatar Mar 31 '22 10:03 tomekzaw