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

keyboard.dismiss doesn't work #74

Open
taneba opened this issue Jul 26, 2020 · 1 comment
Open

keyboard.dismiss doesn't work #74

taneba opened this issue Jul 26, 2020 · 1 comment

Comments

@taneba
Copy link

taneba commented Jul 26, 2020

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>
@danielxander
Copy link

Same here. Did you fix it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants