From 34dcd0547fa2a49849aa2f402e8b7b16d2aea8b8 Mon Sep 17 00:00:00 2001 From: Kayshen-X Date: Sat, 20 Jun 2026 18:44:44 +0800 Subject: [PATCH] fix(editor): color picker swallows cursor moves over its panel apply_cursor_move only handled the picker while dragging; an open-but-idle picker fell through to the canvas hover layer, so hovering the picker bled selection/hover feedback onto the nodes behind it. Swallow moves whose point is inside the picker panel (clear lower-overlay hover + return), matching the design-md / modal overlay behaviour. --- crates/op-host-native/src/widget_host/input.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/op-host-native/src/widget_host/input.rs b/crates/op-host-native/src/widget_host/input.rs index 6304d1455..583289a19 100644 --- a/crates/op-host-native/src/widget_host/input.rs +++ b/crates/op-host-native/src/widget_host/input.rs @@ -537,6 +537,18 @@ impl WidgetHostNative { } return true; } + // Picker open but not dragging — it is a top-most overlay, so a move + // over its panel must be swallowed (canvas hover must not bleed + // through underneath it). Matches the design-md / modal behaviour. + let picker = op_editor_ui::widgets::color_picker::ColorPicker::for_state( + &self.editor_state, + state.clone(), + ); + let panel = picker.rect(self.last_viewport_w, self.last_viewport_h); + if panel.contains(Point2D::new(x, y)) { + self.clear_lower_overlay_hover(); + return true; + } } // Top-most floating panel drags own cursor movement. if let Some(d) = self.design_md_drag {