From 7ae63b2b665974b7c7c82ba158b59ecd91e1ebe9 Mon Sep 17 00:00:00 2001 From: ardocrat Date: Fri, 30 May 2025 14:14:58 +0300 Subject: [PATCH] fix: modal window focus --- src/gui/app.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/app.rs b/src/gui/app.rs index 8c21472d..c9465b9e 100755 --- a/src/gui/app.rs +++ b/src/gui/app.rs @@ -130,7 +130,9 @@ impl App { } // Show modal or keyboard window above others. - ctx.move_to_top(LayerId::new(Order::Middle, egui::Id::new(Modal::WINDOW_ID))); + if Modal::opened().is_some() { + ctx.move_to_top(LayerId::new(Order::Middle, egui::Id::new(Modal::WINDOW_ID))); + } let keyboard_showing = if let Some(l) = ctx.top_layer_id() { l.id == egui::Id::new(KeyboardContent::WINDOW_ID) } else {