gorhom / react-native-bottom-sheet

A performant interactive bottom sheet with fully configurable options 🚀
https://ui.gorhom.dev/components/bottom-sheet
MIT License
6.7k stars 742 forks source link

[v4] | [v2] keyboard disappears after pressing input #1841

Open arpkirill opened 4 months ago

arpkirill commented 4 months ago

Bug

When you try to open the keyboard by pressing input, the keyboard appears for a couple of seconds and then disappears, this only happens on some phones. I couldn't understand the pattern.

SAMSUNG SM-A105F SAMSUNG SM-A750FN

Environment info

Library Version
@gorhom/bottom-sheet 4.6.3
react-native 0.71.8
react-native-reanimated 3.11.0
react-native-gesture-handler ^2.16.2

Steps To Reproduce

  1. Open the modal
  2. Click on input
  3. See the keyboard for a couple of seconds and then it disappears

Describe what you expected to happen:

  1. Open the keyboard and don’t close it until you want to

Reproducible sample code

https://github.com/gorhom/react-native-bottom-sheet/assets/44532033/0ef5822a-22a6-4460-b67e-a15bbb4eeb31

    <View style={st.container}>
      <BottomSheet
        index={0}
        onClose={handleClose}
        topInset={containerStyle.paddingTop}
        backgroundStyle={st.sheetBackground}
        handleIndicatorStyle={st.indicator}
        keyboardBehavior="extend"
        keyboardBlurBehavior="none"
        android_keyboardInputMode="adjustResize"
        enableDynamicSizing={true}
        enablePanDownToClose={true}>
        <BottomSheetView style={st.content}>
          <FormikProvider value={formik}>
            <Text style={st.title}>Введите сумму вывода</Text>
            <Text style={st.text}>
              {'Ближайший вывод будет произведен \nв ближайшее время'}
            </Text>
            <TextField
              name={'amount'}
              InputComponent={BottomSheetTextInput}
              containerStyle={st.inputContainer}
              placeholder={'0'}
              keyboardType={'numeric'}
              addAfter={<Text>₽</Text>}
            />
            <Button
              containerStyle={st.button}
              text={'Вывести'}
              onPress={formik.handleSubmit}
            />
          </FormikProvider>
        </BottomSheetView>
      </BottomSheet>
    </View>
arpkirill commented 4 months ago

Perhaps this is due to the height of the keyboard, if it is too high, then the keyboard collapses

LizMyers commented 3 months ago

I have the very same problem

arpkirill commented 3 months ago

I have the very same problem

I found a temporary solution, but it makes the interface a bit crooked.

        keyboardBehavior={Platform.OS === 'ios' ? 'interactive' : 'fillParent'}
PankajRanaAdglobal commented 3 months ago

Facing same Keyboard issue in Android device only. Any Update on this?

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

arpkirill commented 2 months ago

actual

duydtd97 commented 2 months ago

bug_bottomsheet I have the very same problem, anyone help me !

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

micheleb commented 1 month ago

having the exact same issue

duydtd97 commented 1 month ago

dont close this thread :v

micheleb commented 1 month ago

actually I think this is the same as #1602

github-actions[bot] commented 3 days ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.