第二次到达时键盘不可见

Keyboard is not visible in the second time when reaching

虽然是第一次弹出键盘,但当我导航到同一界面时,文本输入字段已获得焦点,但在 React Native 应用程序中键盘没有弹出。

我用过autoFocus={ true }但是我看不到键盘。如何解决这个问题。

您可以使用 'push' 而不是 'navigate'。当导航到同一界面时,componentWillMount/componentDidMount 不会再次加载。这可能是问题所在。试试这个。

参考反应导航文档。 React Navigation Documentation

如果您正在使用 ScrollView,请添加 keyboardShouldPersistTaps="always"

  <ScrollView keyboardShouldPersistTaps="always">
   ------
  </ScrollView>