Dimensions.get('window').height does not exclude the notch and home bar for iPhone X #17478
Labels
Ran Commands
One of our bots successfully processed a command.
Resolution: Locked
This issue was locked by the bot.
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: macOS High Sierra 10.13.2
Node: 8.9.1
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.7.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.50.3 => 0.50.3
Target Platform: iOS (10.3)
Steps to Reproduce
Dimensions.get('window') and Dimensions.get('screen') returns the same number on iOS which has never been an issue until the iPhone X
(Write your steps here:)
Expected Behavior
I understand that it's not accounted for in the code and before this has been an android only problem but with the iPhone X, being restricted to safe area view and the dimensions extending that by x amount is causing problems with trying to scale UI elements.
It would be good if there was android behaviour where .get('screen') behaves as it does currently but .get('window') is restricted to the dimensions of the Safe Area View.
This is very easily reproducible. I would be happy to try and fix this as a PR.
The text was updated successfully, but these errors were encountered: