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

Inner size and position should not correspond to the "safe area" size on iOS #1122

Closed
ghost opened this issue Aug 26, 2019 · 0 comments · Fixed by #3890
Closed

Inner size and position should not correspond to the "safe area" size on iOS #1122

ghost opened this issue Aug 26, 2019 · 0 comments · Fixed by #3890
Labels
B - bug Dang, that shouldn't have happened DS - ios

Comments

@ghost
Copy link

ghost commented Aug 26, 2019

On iOS the top-left corner of the safe area is inside the client area. With the current API, if you want to accommodate for the safe area on iOS, you call inner_position and inner_size on the window and layout your content accordingly (i.e. move it away from the edges and size it down). However, on the desktop, the top-left corner the client area is not inside the window decorations. Therefore, doing this offset is incorrect on desktop platforms. Let's say that the safe area is 50 pixels wide on iOS and the window decorations are 20 pixels wide on a desktop platform. Your content displays correctly on iOS, but is now off by 20 pixels on the desktop platform. You would need to use conditional compilation to only offset your content on iOS, but this does not seem right to me. It's the same API, but it behaves differently on a different platform. We should instead expose a platform-specific function for querying the safe area size, instead of using inner_position and inner_size for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B - bug Dang, that shouldn't have happened DS - ios
Development

Successfully merging a pull request may close this issue.

1 participant