Skip to content
This repository has been archived by the owner on May 7, 2022. It is now read-only.

iOS negative keyboard height #30

Closed
piers-smartwyre opened this issue Feb 14, 2022 · 2 comments
Closed

iOS negative keyboard height #30

piers-smartwyre opened this issue Feb 14, 2022 · 2 comments

Comments

@piers-smartwyre
Copy link

Hi, first of all great project this is really useful! However I have stumbled across an issue on iOS.

Screen.Recording.2022-02-14.at.15.47.11.mov

It seems that the updateKeyboardDimensions function in node_modules/@flyerhq/react-native-keyboard-accessory-view/lib/hooks/useKeyboardDimensions.js is calculating a negative keyboard height of -174 when the keyboard closes which is different to it's original state where keyboard height is 0.

I've managed to solve this issue myself by using Math.max in this calculation, although I'm not sure if this is going to cause issues elsewhere!

@piers-smartwyre
Copy link
Author

This could also be solved by adding the 'keyboardDidHide' listener to ios, resetting the value to 0 when it closes.

@demchenkoalex
Copy link
Member

Hi! This behaviour is now included in RN 0.68 and you don't need this library anymore. Refer to facebook/react-native#31402. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants