Closed robloo closed 1 year ago
Possibly fixed by #5640, will test when I get a chance
@robloo were you able to retest this sometime?
Not yet, I'm still on an older 3.6.x build and was waiting for 3.8 to do another round of testing.
(I'm also hoping the VS issues get fixed so Uno builds again without a host of issues)
Tested again with 3.8.6 and the issue is still present. Light dismiss of a MenuFlyoutSubItem
will completely freeze the UI.
So this issue no longer crashes the app. However, it is impossible to light dismiss a MenuFlyoutSubItem. The menu flyout simply will not close if you click outside of the menu. The only way to close the menu once the MenuFlyoutSubItem is opened is to make a selection.
Note that this issue doesn't happen for MenuFlyoutItem which works correctly. It is only in nested menus.
Have you tried disabling native popups? This is likely related.
I made sure to disable native popups using:
<Button.Flyout>
<MenuFlyout
Placement="Bottom"
not_win:UseNativePopup="False">
<!-- elements removed -->
</MenuFlyout>
</Button.Flyout>
and also in the App constructor just in case:
public App()
{
this.InitializeComponent();
#if !NETFX_CORE
// For Uno Platform apps, make sure to configure UWP styles instead of platform-native
Uno.UI.FeatureConfiguration.Style.UseUWPDefaultStyles = true;
#endif
}
Functionality was not changed:
Changing this to true
causes the item to be light dismissed correctly. But light dismiss doesn't delegate to parents (ie, you'll have to do multiple clicks to completely dismiss the whole menu. Every click dismisses the inner-most open child)
Changing this to
true
causes the item to be light dismissed correctly. But light dismiss doesn't delegate to parents (ie, you'll have to do multiple clicks to completely dismiss the whole menu. Every click dismisses the inner-most open child)
The dismiss-layer is handle directly Popup
level (https://github.com/unoplatform/uno/blob/master/src/Uno.UI/UI/Xaml/Controls/Popup/Popup.cs#L78) while it should be handled PopupRoot
and/or PopupPanel
, and clicking out of popups should dismiss all of them at once. Wondering however what is the behavior if a open a dismissable and a non dismissable popup and the same time.
GitHubBuild Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported. - uno/Popup.cs at master · unoplatform/uno
This doesn't reproduce and is tested in https://github.com/unoplatform/uno/blob/master/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Controls/MenuFlyoutTests/MenuFlyoutTests.cs#L202.
Current behavior
With nested MenuFlyoutItems (example below) the flyouts show correctly. However, if no selection is made and a click is made outside the flyout (to light dismiss) the flyout stays open. The UI locks up and no press is received anywhere else, even on the menu items.
Note that this issue only occurs when the MenuFlyoutSubItem is open.
Expected behavior
Should LightDismiss, no lockup
How to reproduce it (as minimally and precisely as possible)
See above
Workaround
None
Environment
Nuget Package:
Nuget Package Version(s): 3.4.0
Affected platform(s):
IDE:
Relevant plugins:
Anything else we need to know?