Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

OTP prompt doesn't extend underneath safe areas #37

Open
tristan-warner-smith opened this issue Feb 23, 2024 · 2 comments
Open

OTP prompt doesn't extend underneath safe areas #37

tristan-warner-smith opened this issue Feb 23, 2024 · 2 comments

Comments

@tristan-warner-smith
Copy link
Contributor

Describe the bug
When the OTP is presented on a device with a notch, the content doesn't extend under the safe areas resulting in prominent bars as shown. Shown in dark mode where it's more obvious.

To Reproduce
Steps to reproduce the behavior:

  1. Be on a device with a notch, in dark mode ideally
  2. Trigger the OTP screen with magic.auth.loginWithEmailOTP
  3. See the bars

Expected behavior
The loaded web view should extend under the safe area and the loaded content should continue to respect the safe area.

Screenshots

Here's the view debugger showing the scrollview, made red. With the subview inside respecting safe area.
You can get the subview to extend under the safe areas by adding:
contentInsetAdjustmentBehaviour = .never
But you'll then need the web content to adjust the close button etc using the css for safe areas

Environment

  • Package Version: 10.0.1
  • XCode Version: 15.3
  • Swift Version: 5.9
  • Simulator / Device OS: iOS 17

Additional context
Add any other context about the problem here.

@Ariflo
Copy link
Contributor

Ariflo commented Mar 19, 2024

@tristan-warner-smith is this resolved with your passing a UIViewController here?

@tristan-warner-smith
Copy link
Contributor Author

@tristan-warner-smith is this resolved with your passing a UIViewController here?

It could be but this is the default, out-of-the-box experience so I think it needs fixing separately.
I mentioned before but we aren't doing the work to use the view host yet so the default experience is still this ☝️

@Ariflo Ariflo removed their assignment Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants