react-navigation / react-navigation

Routing and navigation for your React Native apps
https://reactnavigation.org
23.3k stars 4.97k forks source link

Keyboard is dismissed immediately when focusing on TextInput field on non-outer tabs for `react-native-tab-view` #11938

Open alianza opened 1 month ago

alianza commented 1 month ago

Current behavior

When focusing on an TextInput field on a tab that is not the first or last tab the keyboard open and get's dismissed again immediately.

https://github.com/react-navigation/react-navigation/assets/1502192/eeeacf04-e278-4a3a-9b35-547fa54af17e

When using lazy={true} the issue occurs once every time you navigate to a non-outer tab (any except the first/last one)

Expected behavior

I would expect the keyboard to remain opened and focused on the TextInput until the user dismisses it.

Reproduction

https://snack.expo.dev/@phyrexalianza/react-native-tab-view-textinput-non-outter-routes-bug

Platform

Packages

Environment

package version
react-native-tab-view 3.5.2
react-native-pager-view 6.2.3
@react-navigation/native 6.1.17

Only packages in snack reproduce example

github-actions[bot] commented 1 month ago

Couldn't find version numbers for the following packages in the issue:

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.