git.lucas.co / cce-data-editor
structured data editor
git clone https://git.lucas.co/cce-data-editor.git

commit8bc371b5f93d4f1ab651f9125f50804a39c2b9cd
parentbf31a7c32c
authorLucas Galante <[email protected]>
date2026-06-29 20:54
Fix selected_choice_editor popover immediately closing on click release by verifying editor_handled in click-outside handler

 src/main.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.rs b/src/main.rs
index f762fa6..730c711 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1509,7 +1509,7 @@ impl Application for DataEditorApp {
                     }
                 }
             }
-        } else if button == MouseButton::Left && state == ElementState::Pressed {
+        } else if !editor_handled && button == MouseButton::Left && state == ElementState::Pressed {
             let bottom_y = bottom_y_calc(self.height);
             let in_new_key = px >= 10.0 && px <= 270.0 && py >= bottom_y + 10.0 && py <= bottom_y + 36.0;
             let in_sel_val = px >= 10.0 && px <= 270.0 && py >= bottom_y + 70.0 && py <= bottom_y + 96.0;