Skip to content

Tapping status bar scrolls to bottom of inverted list #1618

Open
@kevinschaich

Description

@kevinschaich

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions