Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more.
MIT License
16.35k
stars
2.4k
forks
source link
Keyboard space is not removing insets from the ScrollView correctly #2042
Just to add more information about my debug, If I force the ignoreContentInsetAdjustment prop to true, then the ScrollView bottom space disappears after keyboard closes and the user scroll the screen.
Describe the bug
Hi @hackiftekhar, Douglas here again, the maintainer of React Native Keyboard Manager.
Recently I have updated the
IQKeyboardManager
from 6 to 7.0.2, and we can note several improvements and fixes in the library (including https://github.com/hackiftekhar/IQKeyboardManager/issues/1361 and https://github.com/hackiftekhar/IQKeyboardManager/issues/1422), thank you very much for that!But also I found a new situation related to ScrollView in React Native, when using in a React Navigation screen.
To Reproduce
I dont know if you can run a React Native project, but to reproduce just run the Sample project branch
7-preview
of the React Native Keyboard Manager.cd Sample
./install.sh
Expected behavior
We expect that the extra bottom space to be removed when keyboard closes.
Screenshots
Version 7.0.2
Version 6.5.16
Demo Project
https://github.com/douglasjunior/react-native-keyboard-manager/tree/master/Sample
Versions
Xcode: 15.2 Mac OS: 13.5.1 Simulator/Device: Simulator Simulator/Device Name: iPhone 15 Pro Max - iOS 17.2 Library Version: 7.0.2
Additional context
Looking to the log, seems that the insets are set wrong when the keyboard closes, I think that the bottom should be set to
0.0
instead of420.0
:IQKeyboardManager| | old ContentInset: UIEdgeInsets(top: 0.0, left: 0.0, bottom: 376.0, right: 0.0) new ContentInset: UIEdgeInsets(top: 0.0, left: 0.0, bottom: 420.0, right: 0.0)
Debug log: