react-navigation / react-navigation/react-navigation

Keyboard dismiss immediately in forFadeFromBottomAndroid and forVerticalIOS cardStyleInterpolator

Open
#8,525 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug package:stack
Dominant language
TypeScript
Stars
24.5k
Forks
5.1k
Avg merge
1d 5h
Merged PRs (30d)
18

Description

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.

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 is just simple component:

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

@react-navigation/native: "^5.5.1"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided RootStack, TextInput, and the forFadeFromBottomAndroid or forVerticalIOS interpolators, then compare it with forHorizontalIOS. The issue is resolved when focusing the TextInput no longer immediately dismisses the keyboard with the affected interpolators.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.