From bbd910c0f29113dfefcc8409c437b5e3016fdfdf Mon Sep 17 00:00:00 2001 From: Research Assistant Date: Wed, 20 May 2026 19:08:02 +0800 Subject: [PATCH] fix: use rectEl instead of targetEl in delete handler --- paperforge/plugin/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paperforge/plugin/main.js b/paperforge/plugin/main.js index 0bad572c..c38f993a 100644 --- a/paperforge/plugin/main.js +++ b/paperforge/plugin/main.js @@ -1150,7 +1150,7 @@ function showAnnotationPopover(event, ann, rectEl, vaultPath, pdfPath, container hideAnnotationPopover(); if (result.ok) { // Remove the rect element directly — no full rebuild - if (targetEl && targetEl.parentElement) targetEl.remove(); + if (rectEl && rectEl.parentElement) rectEl.remove(); invalidateAnnotationCache(); } else { console.warn('[PF] delete annotation failed:', result.error);