From d5b0088cfb0816d48d2249b9227546d4e9116039 Mon Sep 17 00:00:00 2001 From: Kayshen-X Date: Sun, 9 Aug 2026 22:54:21 +0800 Subject: [PATCH] fix(canvas): drop an image onto an empty placeholder fills it again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A jian bump made unpainted container bodies opt out of the click hit-test, which also excluded empty placeholder boxes from image-drop resolution — a drop over one inserted a fresh node instead of filling it. Resolve the drop target through the new fill hit-test variant that keeps empty bodies in the path, and bump the jian pin to carry it. --- crates/op-host-native/src/widget_host/image_drop_target.rs | 5 ++++- vendor/jian | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/op-host-native/src/widget_host/image_drop_target.rs b/crates/op-host-native/src/widget_host/image_drop_target.rs index 5934bdeb6..5d508b40b 100644 --- a/crates/op-host-native/src/widget_host/image_drop_target.rs +++ b/crates/op-host-native/src/widget_host/image_drop_target.rs @@ -58,9 +58,12 @@ impl WidgetHostNative { .editor_state .viewport .to_document(Point2D::new(x - cx0, y - cy0)); + // The fill variant so an empty placeholder box — which paints nothing + // and therefore opts out of the click hit-test — is still offered as a + // drop target instead of the image landing as a fresh sibling node. let path = self .layout_scene - .node_path_at_doc_point(doc_point, self.editor_state.viewport.zoom)?; + .node_path_at_doc_point_for_fill(doc_point, self.editor_state.viewport.zoom)?; self.editor_state.resolve_image_drop_target(&path) } diff --git a/vendor/jian b/vendor/jian index 18691c421..2edfc361c 160000 --- a/vendor/jian +++ b/vendor/jian @@ -1 +1 @@ -Subproject commit 18691c42169f59374d58d13065fc606fa6c39c24 +Subproject commit 2edfc361cff3f6f33174746c048002607d691d1c