Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Screen not using the full width by default when on locked device orientation #27741

Open
LennyIncrement opened this issue Feb 12, 2025 · 2 comments
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView platform/iOS 🍎 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@LennyIncrement
Copy link

LennyIncrement commented Feb 12, 2025

Description

Hi,

I'm currently struggling with a MAUI Blazor Hybrid project...
If I lock the device orientation to landscape only then the screen is not using the full width (Simulated with iPhone 15 iOS 17.5 but also on a real iPhone device XR iOS 18.2.1).

It occures only on iOS.

What's really interesting is that if you allow portrait and then rotate the device to landscape then the width uses the full screen.
If you paint the background of the body to some other color than white you can see that the white area is part of the HTML-View

Image

Edit: Add link to public reproduction project repository

Steps to Reproduce

  1. Create a new project ".NET MAUI Blazor Hybrid App"
  2. Framework: .NET 9 + Include sample pages
  3. Go to the Info.plist and disable Portrait
  4. Start the project with an iOS Simulator or a real device

Link to public reproduction project repository

https://github.com/LennyIncrement/maui-27741

Version with bug

9.0.14 SR1.4

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 17.X, iOS 18.X

Did you find any workaround?

Give the html, body element the full width
html, body { width: 100vw; }

Relevant log output

@LennyIncrement LennyIncrement added the t/bug Something isn't working label Feb 12, 2025
@PureWeen PureWeen added area-blazor Blazor Hybrid / Desktop, BlazorWebView s/needs-repro Attach a solution or code which reproduces the issue labels Feb 12, 2025
@LennyIncrement
Copy link
Author

I updated the issue and linked an example project

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-repro Attach a solution or code which reproduces the issue labels Feb 13, 2025
@Ying-6
Copy link

Ying-6 commented Feb 13, 2025

This issue has been verified using Visual Studio Code 1.97.0 (9.0.40 & 9.0.14 & 9.0.0). Can repro this issue on iOS platform.
Image

@Ying-6 Ying-6 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed platform/iOS 🍎 labels Feb 13, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView platform/iOS 🍎 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants