Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComboBox don't respond click in a flyout of CommandBar #10181

Closed
qhy040404 opened this issue Nov 19, 2024 · 2 comments
Closed

ComboBox don't respond click in a flyout of CommandBar #10181

qhy040404 opened this issue Nov 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@qhy040404
Copy link

Describe the bug

I have a ComboBox in a CommandBar. CommandBar will collapse the content that cannot be displayed when the width is insufficient. Now I have a narrow window and the ComboBox is collapsed into the secondary menu. When the ComboBox is in the flyout of the secondary menu, it can be clicked to pop up the candidate items, but the selection cannot be responded normally.

Image

Steps to reproduce the bug

<CommandBar Grid.Column="1" Margin="16,0,0,0" DefaultLabelPosition="Right">
    <CommandBar.Content>
        <!-- Try to fill the CommandBar -->
        <TextBox Width="1000"/>
    </CommandBar.Content>

    <AppBarElementContainer>
        <ComboBox ItemsSource="{Binding SomeList, Mode=OneWay}" SelectedItem="{Binding SomeList.CurrentItem, Mode=TwoWay}"/>
    </AppBarElementContainer>
</CommandBar>

Expected behavior

ComboBox's SelectedItem can be properly set in the flyout

Screenshots

Image

NuGet package version

WinUI 3 - Windows App SDK 1.6.3: 1.6.241114003

Windows version

Windows Insider Build (xxxxx), Windows 11 (22H2): Build 22621

Additional context

Insider 26120
Windows 11 24H2 (26100)

@qhy040404 qhy040404 added the bug Something isn't working label Nov 19, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Nov 19, 2024
@Skittles2519
Copy link

@qhy040404 I could reproduce your issue from your provided code. To fix this, you will need to update your AppBarElementContainer to allow focus on interaction. This will allow you to interact with your ComboBox when it's displayed in the flyout. <AppBarElementContainer AllowFocusOnInteraction="True">

@qhy040404
Copy link
Author

qhy040404 commented Nov 20, 2024

Thanks a lot. It works.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the needs-triage Issue needs to be triaged by the area owners label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants