[BUG] Content of a ContentPage doesn't occupy full height when page is pushed to PrismNavigationPage
anpin opened this issue · comments
Description
Content of a PrismNavigationPage has inconsistent layout on MAUI iOS and MacCatalyst. Not sure if this issue belongs here or upstream in the MAUI, but I can reproduce it only when using prism.
Please see the repro for screenshots https://github.com/anpin/prism-ios-layout
Steps to Reproduce
- Clone https://github.com/anpin/prism-ios-layout
- Run Debug on iOS -> tap the "Click me" -> Observe
aquamarine
colored space on top of the list - Run NOPRISM on iOS for vanilla MAUI navigation page with the exact same page shown -> Observe no additional space on top of the list
- Run Debug on Mac -> Observe aquamarine space on top of the button -> tap the "Click me" -> Observe pink colored space on top of the list
- Run NOPRISM on Mac for vanilla MAUI navigation page with
almost
exact same page shown -> Observe no additional space on top of the button or list on the next page
Platform with bug
.NET MAUI
Affected platforms
iOS, macOS
Did you find any workaround?
not yet
Relevant log output
No response
I've noticed this issue aswell but I don't think Prism is to blame. PrismNavigationPage
inherits NavigationPage
, I think instead it is a Maui issue.
A good workaround is to put this on your ContentPage
:
Padding="{OnPlatform '0', iOS='0,-5,0,0'}"
I opened an issue in MAUI repo too. However as mentioned in the reproduction the native navigation page doesn't have the gap.
@anpin ultimately this is unlikely to be a Prism issue. Prism doesn't make up it's own Navigation handlers, we build on top of the MAUI API's for Navigation making it easier but in the end it's just using the same Push and Pop methods that you would get from MAUI itself.
fixed in upstream