react-native-input-scroll-view icon indicating copy to clipboard operation
react-native-input-scroll-view copied to clipboard

keyboard.dismiss doesn't work

Open taneba opened this issue 5 years ago • 1 comments

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>

taneba avatar Jul 26 '20 23:07 taneba

Same here. Did you fix it?

danielxander avatar Nov 10 '20 14:11 danielxander