Skip to content
This repository was archived by the owner on Jul 27, 2021. It is now read-only.

keyboard.dismiss doesn't work #74

@taneba

Description

@taneba

Problem

I'm using TouchableWithoutFeedback inside of InputScrollView in order to hide keyboard when user press outside of the textinput, but Keyboard.dismiss doesn't work.

Repro

here's a reproduction code. console.warn in the onPress is called but Keyboard.dismiss doesn't work for some reason.

    <InputScrollView
      style={{flex:1}}
      keyboardShouldPersistTaps={'always'}
    >
      <TouchableWithoutFeedback
        onPress={() => {
          console.warn('keyboard should be closed')
          Keyboard.dismiss()
        }}
        style={{ backgroundColor: 'blue' }}
      >
        <TextInput
          multiline
          scrollEnabled={false}
          style={{marginTop: 300}}
        />
      </TouchableWithoutFeedback>
    </InputScrollView>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions