From 99df6357344e3586a025abd27b283740f357bb5f Mon Sep 17 00:00:00 2001 From: vladbat00 Date: Fri, 10 Oct 2025 14:50:45 +0300 Subject: [PATCH] Fix popups immediately closing on mouse button release --- crates/egui/src/containers/popup.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/egui/src/containers/popup.rs b/crates/egui/src/containers/popup.rs index a9c00661d23..bd91a170d9a 100644 --- a/crates/egui/src/containers/popup.rs +++ b/crates/egui/src/containers/popup.rs @@ -594,7 +594,7 @@ impl<'a> Popup<'a> { }); // If the popup was just opened with a click, we don't want to immediately close it again. - let close_click = was_open_last_frame && ctx.input(|i| i.pointer.any_click()); + let close_click = was_open_last_frame && ctx.input(|i| i.pointer.any_pressed()); let closed_by_click = match close_behavior { PopupCloseBehavior::CloseOnClick => close_click,