dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22k stars 1.72k forks source link

iOS: Flyout Menu Backdrop Area does not Readjust on Orientation Change #21105

Open asi-evin opened 6 months ago

asi-evin commented 6 months ago

Description

If the flyout menu is open, and you change the orientation from portrait to landscaper, the backdrop area does not re-adjust accordingly. Furthermore, where the backdrop does not cover the page, you can interact with that page.

This appears to only be an issue on iOS. Android and Windows do not display this issue. Was not able to test MacCatalyst, and did not try an iPad either.

Steps to Reproduce

  1. Create New Maui Project
  2. Change "Shell.Flyout.Behavior" to "Flyout"
  3. Add Flyout Items (simplest to to just add menu items).

    • Bonus: Change "Shell.FlyoutBackdrop" to make the issue more obvious.
    • Example Shell XAML:
      
      <?xml version="1.0" encoding="UTF-8" ?>
      <Shell
      x:Class="Flyout_Orientation_Change_Testing.AppShell"
      xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
      xmlns:local="clr-namespace:Flyout_Orientation_Change_Testing"
      Shell.FlyoutBehavior="Flyout"
      Shell.FlyoutBackdrop="#7FFFFF00"
      Title="Flyout_Orientation_Change_Testing">

    <ShellContent Title="Home" ContentTemplate="{DataTemplate local:MainPage}" Route="MainPage" />

  4. Launch App on iOS device or simulator.
  5. Open the Flyout.
  6. While the Flyout is Open, Change the phone's Orientation.

Expected Result:

Actual Result:

2024-03-08_11-26-46-AM 2024-03-08_11-27-06-AM

Link to public reproduction project repository

None. Simple enough to create from starting template.

Version with bug

8.0.7 SR2

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 17.2

Did you find any workaround?

Haven't tried messing with the Handler yet. Closing and opening the flyout does fix the issue, so perhaps you could do that on orientation changes.

Relevant log output

None
RoiChen001 commented 6 months ago

Can repro this issue at iOS platform on the latest 17.10 preview 2.