mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-24 09:57:08 -06:00
fix(menus): Alt held through a shortcut no longer puts the keyboard on the menu bar, so Enter reaches the dialog (#7481)
This commit is contained in:
@@ -208,7 +208,12 @@ impl Keys {
|
||||
}
|
||||
let events = ctx.input(|i| i.events.clone());
|
||||
let mut tap = false;
|
||||
for e in &events {
|
||||
// The tap is judged on every event of the frame, also those another handler consumed
|
||||
// before the bar's turn: the shortcuts run first, so Ctrl+Alt+I (Image Size) left no
|
||||
// trace in `events`, and releasing Alt counted as a tap that put the keyboard on the bar;
|
||||
// Enter then opened File instead of confirming the dialog (#7481).
|
||||
let raw = ctx.input(|i| i.raw.events.clone());
|
||||
for e in &raw {
|
||||
match e {
|
||||
Event::Key { key: Key::AltLeft | Key::AltRight, pressed: true, .. } => {
|
||||
self.alt_down = true;
|
||||
|
||||
Reference in New Issue
Block a user