Skip to content

Tapping status bar scrolls to bottom of inverted list #1618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 2 tasks
kevinschaich opened this issue Apr 16, 2025 · 0 comments
Open
1 of 2 tasks

Tapping status bar scrolls to bottom of inverted list #1618

kevinschaich opened this issue Apr 16, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@kevinschaich
Copy link

kevinschaich commented Apr 16, 2025

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

@kevinschaich kevinschaich added the bug Something isn't working label Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant