ardaogulcan/react-native-keyboard-accessory

Extra space in KeyboardAccessoryView for iPhone 12 Pro

dhythm opened this issue · 1 comments

Hello,

I found strange behavior in iPhone 12 Pro.
It would be good for iPhone 8 (Touch ID model) but not work well for Face ID model.

iPhone 12 Pro
Simulator Screen Shot - iPhone 12 Pro - 2021-11-26 at 11 28 58

iPhone 8
Simulator Screen Shot - iPhone 8 - 2021-11-26 at 11 27 26

I use KeyboardAccessoryNavigation and pass avoidKeyboard and inSafeAreaView as props.
Then, accessoryHeight in KeyboardAccessoryView will be 45 for both devices.

When I put an offset -30tovisibleHeight` like

    const visibleHeight = accessoryHeight + (avoidKeyboard ? keyboardHeight : 0) - 30;

, then it looks good for both iPhone 12 and iPhone 8.

Is there any solution that I don't need to fix the lib? 🙏

A possible solution for this issue is addressed here. Please check it.
#47 (comment)