Open
Description
Current behavior
Tapping status bar on iOS scrolls to the screen bottom of an inverted FlashList
Expected behavior
Tapping status bar on iOS scrolls to the screen top of an inverted FlashList
To Reproduce
I tried this both with and without the preventDefault
and stopPropagation
. Unfortunately I'm not able to override the default behavior and first, it scrolls to the bottom of the list, then scrolls to the top of the list. Removing scrollsToTop={true}
disables the tap status bar gesture entirely.
<FlashList
onScrollToTop={(e: NativeSyntheticEvent<NativeScrollEvent>) => {
// these don't do anything
e.preventDefault()
e.stopPropagation()
// this happens AFTER the default
flashListRef.current?.scrollToEnd({ animated: true })
}}
scrollsToTop={true}
inverted
...
/>
Platform:
- iOS
- Android
Environment
1.7.6