Skip to content
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 Space showing on top of keyboard #18271

Closed
sushantsaho opened this issue Mar 8, 2018 · 4 comments
Closed

Extra Space showing on top of keyboard #18271

sushantsaho opened this issue Mar 8, 2018 · 4 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@sushantsaho
Copy link

While using SafeAreaView in iPhoneX, There is a extra space on top of keyboard

Environment

OS: macOS High Sierra 10.13.1
Node: 9.4.0
Yarn: 1.3.2
npm: 4.6.1
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b

Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.51.0 => 0.51.0

Expected Behavior

Extra space should not not be there on Top of keyboard.

Actual Behavior

Keyboard has extra space
simulator screen shot - iphone x - 2018-03-08 at 15 42 13

Steps to Reproduce

(Link to Snack, or steps to reproduce.)

@react-native-bot react-native-bot added the Platform: macOS Building on macOS. label Mar 20, 2018
@hramos hramos removed the Platform: macOS Building on macOS. label Mar 29, 2018
@b4stien
Copy link

b4stien commented Apr 12, 2018

I can confirm I have the same issue with Expo 26 (that's react native 0.54).

@catherinepricillas
Copy link

hi, do you find any solution to this problem? I'm currently dealing with same issue @b4stien @sushantsaho

@razor1895
Copy link

I found a tricky solution. Im using react-navigation's implementation of SaveAreaView and it has the same issue, but fortunately it has a forceInset prop to decide whether to show top/bottom/horizontal safe area. So the solution could be very simple, and i'll just post part of my code here.

import { Keyboard } from 'react-native';
import { SafeAreaView } from 'react-navigation';
 ...
keyboardWillShow = e => {
  this.setState({ disableBottomSafeArea: true });
};

keyboardWillHide = () => {
  this.setState({  disableBottomSafeArea: false });
};

<SafeAreaView forceInset={{ bottom: this.state.disableBottomSafeArea ? 'never' : 'always' }} style={{ flex: 1, backgroundColor: '#fff' }}>
  ...
</SafeAreaView>

@react-native-bot
Copy link
Collaborator

I am closing this issue because it does not appear to have been verified on the latest release, and there has been no followup in a while.

If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.

@react-native-bot react-native-bot added the Ran Commands One of our bots successfully processed a command. label Jul 17, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Jul 18, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

7 participants