From 3ba5dbb9e88acf6b3459caba68244b7b988fd625 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 27 Nov 2023 15:15:53 +0100 Subject: [PATCH] Prevent mousedown on docs from being propagated to the editor --- crates/editor2/src/editor.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 451a3c6535..3a9a40328d 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -1274,6 +1274,9 @@ impl CompletionsMenu { div.id("multiline_docs") .max_h(max_height) .overflow_y_scroll() + // Prevent a mouse down on documentation from being propagated to the editor, + // because that would move the cursor. + .on_mouse_down(MouseButton::Left, |_, cx| cx.stop_propagation()) }) }; let list = uniform_list(