Keyboard dismiss immediately when focusing textInput for first time react native

Viewed 1054

When I set cardStyleInterpolator to forFadeFromBottomAndroid or forVerticalIOS for a Stack.Screen, keyboard immediately dismiss when focusing on TextInput. This not happen for other type.

This only happen for first focus on TextInput.

Here is what's happening:

RN

function RootStack() {
return (
  <Stack.Navigator
    screenOptions={{
      cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
    }}
  >
    <Stack.Screen name="GROUPS" component={GroupsScreen} options={{ headerShown: false }} />
    <Stack.Screen name="GROUP" component={GroupScreen} />
    <Stack.Screen
      name="CREATE_POST"
      component={CreatePostScreen}
      options={{
        headerShown: false,
        cardStyleInterpolator: CardStyleInterpolators.forFadeFromBottomAndroid,
      }}
    />
    <Stack.Screen
      name="SELECT_POST_TYPE"
      component={AnonymousTypeScreen}
      options={{
        cardStyle: { backgroundColor: "transparent", opacity: 1 },
        headerShown: false,
        cardStyleInterpolator: CardStyleInterpolators.forVerticalIOS,
      }}
    />
  </Stack.Navigator>
);
}

and screen component is just simple component:

return (
  <View>
    <View style={{ flex: 1 }}>
      <TInput />
    </View>
  </View>
);
1 Answers

I have downgraded dependencies for react-navigation ( native & stack ), because previouslly my code was working, so tried this and it worked.

enter image description here

Related