microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.2k stars 668 forks source link

Keyboard accelerator in NavigationViewItem fires ItemInvoked three times #9561

Open eduardobragaxz opened 3 months ago

eduardobragaxz commented 3 months ago

Describe the bug

If you set a keyboard accelerator for a NavigationViewItem, with SelectOnInvoked set to false, the ItemInvoked event on the NavigationView will be fired three times. Doesn't happen if SelectOnInvoked is true. It'll invoke the item you want, then the current selected one and then the one you wanted again. Just as a curiosity, this also happens if no item is selected, in which case it invokes the item you want three times.

This does not happen with a simple click.

Steps to reproduce the bug

Here's the link to the repro

Expected behavior

No response

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.5.2: 1.5.240404000

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

github-actions[bot] commented 3 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.