-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra padding after keyboard was shown #14
Comments
Having the same issue. Looks like the same height of the StatusBar. If you hide the StatusBar the extra space goes away. Must be related to the StatusBar somehow |
Got same issue. Any fix on this? |
@pcofilada I ended up wrapping ScrollView with KeyboardAvoidingView and it's working fine. |
No luck for me. I still got an extra padding. |
Hi there, in KeyboardAwareScrollView.js of this librarie, remove This solved the issue for me |
…should be taken into account - fixes wix-incubator#14
anyone else struggling with this, it is indeed a problem with the StatusBar. If your app does NOT hide the status bar, you'll need something along the lines of shakyShane@37db7cc I just made a new prop |
I am having the same issue. @shakyShane it seems better than just leaving that blank space, but it also move the content up by 20px. About programmatically identifying the statusBar on iOS, apperantly you can do this: import { NativeModules } from 'react-native'
const { StatusBarManager } = NativeModules
let statusBarHeight
StatusBarManager.getHeight(
(statusBarFrameData) => {
statusBarHeight = statusBarFrameData.height;
}
); source: https://github.com/jgkim/react-native-status-bar-size/blob/master/StatusBarSizeIOS.js |
I tried to find a solution for a long time, but I could not find why it happens, I see this react-native-keyboard-aware-scroll-view has the same problem though. Anyway, I found a workaround. Definitely not the best solution, but it works for now: KeyboardAwareScrollView.js (line 13) contentInset={{bottom: this.state.keyboardHeight, top: this.state.top || 0}} KeyboardAwareBase.js (line 115) this.setState({keyboardHeight: 0, top: -20}); This will include the state to set top to -20 when keyboard hide (that is the moment it creates the spacing), otherwise it will still be 0. |
You don't need all these hacks, just add |
@petejkim Thanks! That works perfectly! |
@petejkim |
I also blocked with this for a long time. Did not found any solution yet |
This get resolved. But I have a clarification question. I have a inputbox at the end of the screen and if i type a letter means it will shows a dropdown. Keyboard hides the dropdown in my case. Can anyone give any solution for this |
in react native if you set StatusBar hidden={true} you will get this problem, the solution is just to quit it. I found it out here: facebook/react-native#13000 |
Already fixed at https://github.com/SteFF1997/react-native-keyboard-aware-scrollview |
Hi,
I have one small issue, not sure if it my fault our it is an bug.
Bug appears only after keyboard has been shown. It adds extra padding/margin in top. Gifs below:
This is real padding before keyboard has shown:
And this is after keyboard has been shown:
Code for this:
index.ios.js
login.js
The text was updated successfully, but these errors were encountered: