Describe the bug
If you hide a panel or a menu (IsVisible="False") that contains a button with a HotKey shortcut assigned to it (for example, HotKey="Escape"), the shortcut key still triggers globally.
When you press that key anywhere else in the app, the invisible button still runs its code and "steals" the key press which partically stops the key from working properly anywhere else in the rest of the application.
To Reproduce
- Put a Button inside a hidden layout container (set IsVisible="False" on the parent panel).
- Assign a shortcut key to that button, like HotKey="Escape".
- Press Escape while working in a completely different, visible part of the app.
Expected behavior
The application should ignore HotKey bindings for controls that are not effectively visible or enabled.
Avalonia version
12.0.5
OS
Windows
Additional context
No response
Describe the bug
If you hide a panel or a menu (IsVisible="False") that contains a button with a HotKey shortcut assigned to it (for example, HotKey="Escape"), the shortcut key still triggers globally.
When you press that key anywhere else in the app, the invisible button still runs its code and "steals" the key press which partically stops the key from working properly anywhere else in the rest of the application.
To Reproduce
Expected behavior
The application should ignore HotKey bindings for controls that are not effectively visible or enabled.
Avalonia version
12.0.5
OS
Windows
Additional context
No response