question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS KeyboardAvoidingView not Entirely Avoiding Keyboard

See original GitHub issue

Description

I’m trying to use a keyboard avoiding view to basically push up the entire app window on iOS (mocking the behavior seen by default on Android). KeyboardAvoidingView is having some trouble by not pushing things up quite enough to make it fully visible, the iOS keyboard’s autocorrect menu obscures the very bottom of the contents.

Reproduction Steps and Sample Code

Not really doing anything fancy here, this is actually even simpler code which results in the following screen shots. (The tab bar at the bottom of the app doesn’t and isn’t supposed to move with the rest of the view. It’s intentionally obscured by the keyboard).

<KeyboardAvoidingView behavior="padding" style={{flex: 1, backgroundColor: "#FF0000", justifyContent: "flex-end"}}>
    <PtTextInput theme="dark"/>
</KeyboardAvoidingView>
nokeyboard keyboard

Solution

Not sure what the problem is. Is the keyboard height not being properly calculated?

Additional Information

  • React Native version: 0.43.2
  • Platform: iOS
  • Development Operating System: MacOS
  • Dev tools: iPhone 7 simulator, iOS 10.1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:63
  • Comments:49 (4 by maintainers)

github_iconTop GitHub Comments

78reactions
skhro87commented, Jul 5, 2017

I have my navbar on top so I needed keyboardVerticalOffset={64} not -64 but +64

59reactions
alxvallejocommented, Jun 28, 2017

+1 - with bugs like this, i can not for the life of me take React Native seriously …

Read more comments on GitHub >

github_iconTop Results From Across the Web

KeyboardAvoidingView not Working Properly - Stack Overflow
KeyboardAvoidingView not Working Properly · Try removing paddingBottom: this.keyboardHeight and add flex: 1 to keyboardavoidingview styles.
Read more >
KeyboardAvoidingView not working properly? Check your ...
KeyboardAvoidingView not working properly? Check your Flexbox Layout first. Keyboard overlaying Input or Submit button is a common problem in ...
Read more >
KeyboardAvoidingView - React Native
KeyboardAvoidingView. This component will automatically adjust its height, position, or bottom padding based on the keyboard height to ...
Read more >
keyboardavoidingview ios not working - You.com | The search ...
I am using KeyboardAvoidingView in ios with behavior="padding" but it's not working. My screen has four text input fields, which get hidden by...
Read more >
Avoid Keyboard in React Native Like a Pro - Netguru
KeyboardAvoidingView is a React Native built-in component with full JS implementation. It relies on RN's keyboard events ( ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found