Skip to content

SafeAreaView is not implemented #859

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

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

SafeAreaView is not implemented #859

hugo opened this issue Mar 8, 2018 · 4 comments

Comments

@hugo
Copy link

hugo commented Mar 8, 2018

Do you want to request a feature or report a bug?
Request a feature

What is the current behavior?
SafeAreaView is an alias of View

If the current behavior is a bug, please provide the steps to reproduce and
if a minimal demo of the problem via Glitch or similar (template:
https://glitch.com/edit/#!/react-native-web-playground).

N/A

What is the expected behavior?
SafeAreaView would work on Web as it does on Native. That is, it would be possible to use it to prevent the sensor housing, home indicator, corners, etc. from occluding UI.

Environment (include versions). Did this work in previous versions?

  • OS: iOS 11.x
  • Device: iPhone X
  • Browser: Safari, Chrome, etc.
  • React Native for Web (version): 0.5.0
  • React (version): 16.2

I have a rough version of this that I built for my own use. I'm sure that it is not robust enough for inclusion in this project as is, but I would happy do the work to make it so given sufficient guidance.

@necolas
Copy link
Owner

necolas commented Mar 16, 2018

Are you saying that Safari doesn't prevent OS chrome from covering the web UI by default?

@hugo
Copy link
Author

hugo commented Mar 19, 2018

No, it’s physical protrusions - such as the iPhone X “notch” - covering the UI. I can’t speak to what the situation is on Android devices that also have sensor housing screen cut outs, but I would expect them to require similar workarounds.

Actually, it’s OS chrome as well. The iOS Home Indicator covers UI sometimes.

@necolas
Copy link
Owner

necolas commented Mar 19, 2018

This documentation claims otherwise:

Out of the box, Safari displays your existing websites beautifully on the edge-to-edge display of the new iPhone X. Content is automatically inset within the display’s safe area so it is not obscured by the rounded corners, or the device’s sensor housing.

Repository owner deleted a comment from RangerMauve Mar 19, 2018
@hugo
Copy link
Author

hugo commented Mar 19, 2018

Somewhat misleading.

You can observe the issue with a minimal demo.

Safari without viewport-fit=cover:
screen shot 2018-03-19 at 22 12 27
screen shot 2018-03-19 at 22 12 30

Safari with viewport-fit=cover:
screen shot 2018-03-19 at 22 12 17
screen shot 2018-03-19 at 22 12 20


You can see this conflict between app UI and browser chrome when viewing a Medium.com link in the Twitter in-app browser. The Open in App link is hidden by browser chrome until you scroll, and even then it's still partially underneath the home indicator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants