microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

More's flyout remains open when showing an AppBarButton's flyout outside the More button.

Open acouvert-msft opened this issue 3 years ago • 6 comments

Describe the bug

The overflow menu is not automatically hidden when showing a flyout attached to an AppBarButton which is part of the primary commands.

Steps to reproduce the bug

Using the following code:

<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid>
        <CommandBar
            VerticalContentAlignment="Center"
            DefaultLabelPosition="Right">

            <AppBarButton Label="AppBarButton1">
                <AppBarButton.Flyout>
                    <MenuFlyout Placement="Bottom">
                        <MenuFlyoutItem>Item 1</MenuFlyoutItem>
                        <MenuFlyoutItem>Item 2</MenuFlyoutItem>
                    </MenuFlyout>
                </AppBarButton.Flyout>
            </AppBarButton>

             <AppBarButton Label="AppBarButton2">
                <AppBarButton.Flyout>
                    <MenuFlyout Placement="Bottom">
                        <MenuFlyoutItem>Item 3</MenuFlyoutItem>
                        <MenuFlyoutItem>Item 4</MenuFlyoutItem>
                    </MenuFlyout>
                </AppBarButton.Flyout>
            </AppBarButton>
        </CommandBar>
    </Grid>
</Page>
  1. Resize the page so the ... button is visible but contains only AppBarButton2.
  2. Click on ..., it shows the flyout containing AppBarButton2.
  3. Click on AppBarButton1, it shows its flyout as expected but the flyout containing AppBarButton2 is still visible.

Expected behavior

When clicking on AppBarButton1, the ...'s flyout containing the overflow menu should be hidden before showing the flyout attached to AppBarButton1.

Screenshots

Animation

NuGet package version

Microsoft.UI.Xaml 2.7.0

Windows app type

  • [X] UWP
  • [ ] Win32

Device form factor

Desktop

Windows version

May 2021 Update (19043)

Additional context

No response

acouvert-msft avatar Oct 12 '21 07:10 acouvert-msft

I think this will not be fixable from Winui2. but maybe @llongley thinks it could happen with a template change.

StephenLPeters avatar Oct 20 '21 22:10 StephenLPeters

I don't think this is fixable in WinUI 2, no. CommandBar is an control in Windows.UI.Xaml.

llongley avatar Oct 21 '21 06:10 llongley

@StephenLPeters, @llongley A bug was filled out on our product with the same issue and wondering if there's any known workaround or if this will be fixed with WinUI 2 as it's marked as "needs-winui-3"

More's Flyout (red rectangle below) is still opened and appears behind the Sort's Flyout (green rectangle below) which was opened after the More's image

alcail avatar Oct 04 '22 17:10 alcail

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jul 29 '23 16:07 github-actions[bot]

Any update regarding this issue?

acouvert-msft avatar Jul 31 '23 12:07 acouvert-msft

Confirmed the issue reproes in WinAppSDK (v. 1.4.230913002).

Repro app: WASDK_CSharp_GH_ReproProject (2).zip

DmitriyKomin avatar Feb 28 '24 04:02 DmitriyKomin