KEMBAR78
Blazor Hybrid iOS Safe Areas by TanayParikh · Pull Request #6432 · dotnet/maui · GitHub
Skip to content

Conversation

@TanayParikh
Copy link
Contributor

@TanayParikh TanayParikh commented Apr 22, 2022

Fixes: #6347

After:
image

Before:
image

image

image

@TanayParikh TanayParikh requested a review from javiercn April 22, 2022 23:19
@TanayParikh TanayParikh self-assigned this Apr 22, 2022
@TanayParikh TanayParikh added area-blazor Blazor Hybrid / Desktop, BlazorWebView platform/ios labels Apr 22, 2022
@TanayParikh TanayParikh added this to the 6.0.300 milestone Apr 22, 2022
Copy link
Contributor

@mkArtakMSFT mkArtakMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @TanayParikh!
Technically, this may impact non-iOS UIs too, and that's the only risk that I can think of.
I propose we get this merged soon, we have time to notice and react to it before MAUI GA.

@TanayParikh
Copy link
Contributor Author

TanayParikh commented Apr 22, 2022

Technically, this may impact non-iOS UIs too, and that's the only risk that I can think of.

I had that concern as well, hence I added @supports (-webkit-touch-callout: none) { which is a media query to restrict the changes to iOS. Though I have NOT tested it on other platforms (aside from Mac Catalyst).

@SteveSandersonMS
Copy link
Member

Glad to see the progress here!

@SteveSandersonMS
Copy link
Member

Final question: is there any straightforward way for a developer to prevent the overscroll/bounce effect when scrolling the root scroll container? Having overscroll at the page root makes it feel like not-a-real-app, since fixed/sticky menus bounce around in a way they wouldn't if it was a native app.

This is a longstanding problem for PWAs on iOS that is solvable on Electron. It would be great if this is solvable easily on MAUI too.

@jfversluis
Copy link
Member

Final question: is there any straightforward way for a developer to prevent the overscroll/bounce effect when scrolling the root scroll container? Having overscroll at the page root makes it feel like not-a-real-app, since fixed/sticky menus bounce around in a way they wouldn't if it was a native app.

This is a longstanding problem for PWAs on iOS that is solvable on Electron. It would be great if this is solvable easily on MAUI too.

Looks like we need to add a custom handler to disable the bounce on the WKWebView?

https://github.com/ionic-team/cordova-plugin-ionic-webview/blob/ab7dfc06a7f8780f75800dae4f4217d1956aa7b6/src/ios/CDVWKWebViewEngine.m#L474

@TanayParikh
Copy link
Contributor Author

Maui doesn't yet facilitate control of the iOS status bar. Next best alternative is to have an iOS specific placeholder for the status bar, which is what this PR now accomplishes (alongside better support for notch'd devices).

@TanayParikh TanayParikh marked this pull request as ready for review April 29, 2022 22:49
@TanayParikh TanayParikh requested a review from a team as a code owner April 29, 2022 22:49
Copy link
Member

@MackinnonBuck MackinnonBuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@TanayParikh
Copy link
Contributor Author

Having overscroll at the page root makes it feel like not-a-real-app, since fixed/sticky menus bounce around in a way they wouldn't if it was a native app.

I totally agree and I believe we should spend some time to fix this up. I've created #6689 to track this. As far as I know, there's no "quick & easy" way to do this, and Apple isn't a fan of users disabling this functionality (I could be mistaken). Take this article for instance which shows how it can be disabled in Chrome/FireFox, but not Safari. The workarounds mentioned have also since been disabled.

@TanayParikh TanayParikh enabled auto-merge (squash) April 29, 2022 23:03
@TanayParikh TanayParikh merged commit 32b424d into main Apr 29, 2022
@TanayParikh TanayParikh deleted the taparik/safeAreasMauiBlazoriOS branch April 29, 2022 23:40
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
@samhouts samhouts added the fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-blazor Blazor Hybrid / Desktop, BlazorWebView fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! platform/ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blazor WebView iOS Scrolling Behaves Strangely

6 participants