-1

I'm currently trying to close the keyboard programmatically: https://i.stack.imgur.com/GfY7K.jpg

But it does not work. It actually closes, then reopens when the screen changes, whereas there is no input on the second screen.

I already tried to put Keyboard.dismiss() just before changing the screen and in the componentDidMount() of the second screen, without success.

David Alvarez
  • 1,226
  • 11
  • 23

1 Answers1

1

This happens everytime you have an open Alert while trying to hide the Keyboard. It's quite hacky but you can try to wrap your Alert in a timeout.

setTimeout(() => {
   //... open your alert here
}, 50)
moritzwick
  • 613
  • 1
  • 10
  • 16