From b165cd08ba9b5d4d25291da95f0e5ce3a9b9fc2c Mon Sep 17 00:00:00 2001 From: feeiyu <158308373+feeiyu@users.noreply.github.com> Date: Thu, 19 Mar 2026 16:07:29 +0800 Subject: [PATCH] editor: Fix documentation tooltip reappearing after editor regains focus (#48924) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #48922 When the editor regains focus, it internally triggers the mouse_moved logic again. This causes the hover documentation to be shown even if it was previously dismissed due to user editing. This change skips mouse_moved handling when the cursor is hidden, preventing unintended tooltip popups. [录屏 2026-02-11 19-04-14.webm](https://github.com/user-attachments/assets/ea9f9438-34bf-4771-bbc8-335e9ea59dd7) - [x] Tests or screenshots needed? - [x] Code Reviewed - [x] Manual QA Release Notes: - Fixed documentation tooltip reappearing after editor regains focus --- crates/editor/src/editor.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 61051ec4b65bc1cc694232d7a91075d8764bf0b9..9fb18d414f1b1551390bb71a3b4bd6dc01ae4d27 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -25038,7 +25038,9 @@ impl Editor { } }); - if let Some(position_map) = self.last_position_map.clone() { + if let Some(position_map) = self.last_position_map.clone() + && !self.mouse_cursor_hidden + { EditorElement::mouse_moved( self, &MouseMoveEvent {