kirillzyusko / react-native-keyboard-controller

Keyboard manager which works in identical way on both iOS and Android
https://kirillzyusko.github.io/react-native-keyboard-controller/
MIT License
1.62k stars 67 forks source link

keyboard reopens automatically when swipe down on area above keyboard #416

Closed esenbi closed 5 months ago

esenbi commented 5 months ago

Describe the bug I use KeyboardStickyView to create chat, where there is text input area above interactive keyboard.

When i swipe down on the left side of text input keyboard closes and opens again automatiocally. Swipe down on right side doing nothing.

I find out that this happening because of react-navigations swipe back gesture. Only if swipe down inside gesture area.

Code snippet

<KeyboardStickyView
          style={[
            GlobalStyles.container,
            styles.messagesStyle,
            {paddingBottom: insets.bottom},
          ]}
          offset={offset}>
          <PostsList posts={orderedPosts} />
          <PostCompose ref={bottomSheetRef} id={channel.id} />
        </KeyboardStickyView>

Expected behavior Disable that beavior on swipe down

Screenshots

https://github.com/kirillzyusko/react-native-keyboard-controller/assets/115775474/b9f54ba2-6ccd-4bfc-8a16-145b85fda5bc

Smartphone (please complete the following information):

Additional context Temporary fixed by keyboardHandlingEnabled: false stack screen options.

kirillzyusko commented 5 months ago

Hello @esenbi 👋

I think this library doesn't control position of the keyboard and instead simply tracks its position, right?

What happens if you don't use any components from this library? Will the behavior be the same (i. e. you swipe down but keyboard appears again?)

Also if you don't want to control keyboard position via swipe you can disable interactive keyboard dismissal via keyboardDismissMode="none" property.

Or I didn't understand the issue correctly? 😅

kirillzyusko commented 5 months ago

I'm closing the issue due to inactivity. If you find new bug - don't hesitate to open new issues 😊

Thank you for your contribution!