text editor
git clone https://git.lucas.co/cce-text-editor.git
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;
}