The TextInput's showSoftInputOnFocus prop is causing unnecessary events to be triggered. #45106
Labels
Component: TextInput
Related to the TextInput component.
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
Newer Patch Available
Description
I'm encountering an issue with the TextInput component in React Native when using the
showSoftInputOnFocus
prop. When theTextInput
gains focus, the keyboard does not open, thekeyboardWillShow
andkeyboardDidShow
events are not triggered. However, upon losing focus, thekeyboardWillHide
andkeyboardDidHide
events are fired.This behavior causes problems with Keyboard Aware components that listen for these events.
Steps to reproduce
TextInput
component with theshowSoftInputOnFocus
prop set to false.keyboardWillShow
,keyboardDidShow
,keyboardWillHide
, andkeyboardDidHide
events.TextInput
and observe thatkeyboardWillShow
andkeyboardDidShow
events are not triggered.keyboardWillHide
andkeyboardDidHide
events are triggered.React Native Version
0.72.9
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://snack.expo.dev/@kubatyi.dev/692c3c
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: