Skip to content

KeyboardAvoidingView dont working when horizontal FlatList #1435

@leruse4ka

Description

@leruse4ka

The keyboard closes input when FlatList horizontal=true nested within FlatList horizontal=false.. Only IOS.

Repo for reproducing

const Example = () => {
  const renderExample = ({item, index}) => <View style={{
    padding: 10
  }}
  key={index}>
    <TextInput defaultValue={index}
      value={item.value}
      style={{
        width: 80,
        height: 40,
        backgroundColor: 'white',
        color: 'black'
      }} />
  </View>
  return <KeyboardAvoidingView behavior='padding' style={{flex: 1, height: '100%', width: '100%'}}>
    <FlatList data={[{value: 1}, {value: 2}, {value: 3}, {value: 4}, {value: 5}]}
      contentContainerStyle={{marginTop: '80%'}}
      renderItem={renderExample}
      ListFooterComponent={() => <FlatList horizontal={true} data={[6, 7, 8, 9, 10]} renderItem={renderExample} />}
    />
  </KeyboardAvoidingView>
}

Expected behavior
The keyboard does not close the input

Video

2026-04-15.10.29.27.mov

Smartphone (please complete the following information):

  • Desktop OS: [MacOS 26.4]
  • Device: [Simulator iPhone 17]
  • OS: [iOS 26.4]
  • RN version: [0.82.1]
  • RN architecture: [new]
  • JS engine: [Hermes]
  • Library version: [1.21.5]

Metadata

Metadata

Assignees

Labels

questionYou wanted to clarify something about the usage of the library or have a question about something

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions