Skip to content

Inverted FlashList doesn't respect keyboard insets #1538

Open
@nzapponi

Description

@nzapponi

Current behavior

I created an invterted Flashlist as follows:

<FlashList
    ref={listRef}
    data={data}
    renderItem={renderItem}
    estimatedItemSize={40}
    keyExtractor={(item) => item.message.id}
    getItemType={(item) => item.message.content.type}
    inverted
    onEndReached={endReached}
    keyboardDismissMode={
      Platform.OS === "ios" ? "interactive" : "on-drag"
    }
    automaticallyAdjustContentInsets={false}
    contentInsetAdjustmentBehavior="never"
    maintainVisibleContentPosition={{
      minIndexForVisible: 0,
      autoscrollToTopThreshold: 25,
    }}
    automaticallyAdjustKeyboardInsets={true}
    showsVerticalScrollIndicator={false}
  />

Expected behavior

When opening the keyboard, I expect to see the content scroll up and avoid getting covered by the keyboard itself. This works with FlatList.

To Reproduce

In reality, the content inset is applied at the top, instead of the bottom. So content gets covered by the keyboard, and a huge inset appears at the top of the list.

Platform:

  • iOS
  • Android

Environment

1.7.3

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