From 4e5e040a79bcdc482bb70e44b14e2f2383faf980 Mon Sep 17 00:00:00 2001 From: aiongg Date: Sat, 10 Oct 2026 16:19:06 +0000 Subject: [PATCH] Integration: Numbering & Section Options keeps Enter and Escape for an open popup #342's Numbering & Section Options draws its OK and Cancel beside the options and reads Enter and Escape there, before the footer that #325's update guards. The same popup_open guard applies to those checks, so Enter and Escape in an open menu or name field go to the popup. --- crates/ui-egui/src/dialogs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index b96f4881d..a85cdb7ef 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -1208,10 +1208,10 @@ pub fn show(app: &mut DesignApp, ctx: &egui::Context) { if let Some(ok) = crate::section_options::actions(app, &mut actions) { result = Some(ok); } - if ui.input(|i| i.key_pressed(egui::Key::Enter)) { + if !popup_open && ui.input(|i| i.key_pressed(egui::Key::Enter)) { result = Some(true); } - if ui.input(|i| i.key_pressed(egui::Key::Escape)) { + if !popup_open && ui.input(|i| i.key_pressed(egui::Key::Escape)) { result = Some(false); } }