git.lucas.co / cce-text-editor
text editor
git clone https://git.lucas.co/cce-text-editor.git

commitd504f845c4ef837e2abed4242bb189c5c6c1f58c
parent1b4d51f677
authorLucas Galante <[email protected]>
date2026-07-04 15:39
fix: short-circuit mouse input routing to prevent fall-through behind dropdown popover

 src/main.rs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 4359193..9b2568d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -496,16 +496,14 @@ impl Application for TextEditorApp {
                     }
                 }
             }
-        }
-
-        if self.editor.mouse_input(button, state, px, py, &mut self.ui_context) {
+        } else if self.editor.mouse_input(button, state, px, py, &mut self.ui_context) {
             changed = true;
         } else if state == ElementState::Pressed && button == MouseButton::Left {
             self.editor.unfocus();
             changed = true;
         }
 
-        if changed {
+        if changed || msg_out.is_some() {
             *needs_rebuild = true;
             self.needs_rebuild = true;
         }