From 6bc95e9f0937ee364cc509edb1dcf6daec9754af Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 8 Feb 2023 14:58:53 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/7285 --- app/src/block/popover.ts | 2 +- app/src/protyle/util/paste.ts | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/block/popover.ts b/app/src/block/popover.ts index 9199f0043..f8372d4bc 100644 --- a/app/src/block/popover.ts +++ b/app/src/block/popover.ts @@ -227,7 +227,7 @@ export const showPopover = async () => { return true; } }); - if (!hasPin && + if (!hasPin && popoverTargetElement.parentElement && popoverTargetElement.parentElement.style.opacity !== "0.1" // 反向面板图标拖拽时不应该弹层 ) { window.siyuan.blockPanels.push(new BlockPanel({ diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts index 75c20daa7..7e8d6caf8 100644 --- a/app/src/protyle/util/paste.ts +++ b/app/src/protyle/util/paste.ts @@ -192,6 +192,9 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven const tempInnerHTML = tempElement.innerHTML; insertHTML(tempInnerHTML, protyle, isBlock); filterClipboardHint(protyle, tempInnerHTML); + blockRender(protyle, protyle.wysiwyg.element); + processRender(protyle.wysiwyg.element); + highlightRender(protyle.wysiwyg.element); } else if (code) { if (!code.startsWith('
", "").trim() !== "") { + if (textHTML.replace("", "").trim() !== "") { textHTML = textHTML.replace("", "").replace("", "").trim(); if (files && files.length === 1 && ( textHTML.startsWith("