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

HotKey doesn't work on MenuItem until it is opened #14367

Closed
izaksuilov opened this issue Jan 26, 2024 · 3 comments
Closed

HotKey doesn't work on MenuItem until it is opened #14367

izaksuilov opened this issue Jan 26, 2024 · 3 comments
Labels

Comments

@izaksuilov
Copy link

Describe the bug

The hotkey on the MenuItem is not working until you open it at least once.

To Reproduce

Example here

  1. Create menu
  2. Add into it Menu Item
  3. Add into Menu Item one more Menu Item with command and hotkey
<Menu>
  <MenuItem Header="Open me and after that the hotkey will work">
    <MenuItem Header="Test Command"
              Command="{Binding TestCommand}"
              HotKey="Ctrl+O" InputGesture="Ctrl+O"/>
  </MenuItem>
</Menu>

Expected behavior

The hotkey should work without opening the MenuItem

Environment

  • OS: Windows 11
  • Avalonia-Version: 11.0.7
@izaksuilov izaksuilov added the bug label Jan 26, 2024
@jp2masa
Copy link
Contributor

jp2masa commented Jan 27, 2024

Duplicate of #2441?

@izaksuilov
Copy link
Author

izaksuilov commented Jan 27, 2024

Duplicate of #2441?

I think yes, but it worked in avalonia 10 and after upgrading to avalonia 11 it stopped working

@timunie
Copy link
Contributor

timunie commented Jan 29, 2024

Maybe chaning the ItemsPanel to StackPanel helps here to cancel virtualization. (No does not help) Anyways, I'm closing this as duplicate. We will track it further in the original issue.

@timunie timunie closed this as not planned Won't fix, can't repro, duplicate, stale Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants