Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/11034

Vanessa781183e43406
diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scss
index 0472d1bae7..9758317514 100644
--- a/app/src/assets/scss/protyle/_wysiwyg.scss
+++ b/app/src/assets/scss/protyle/_wysiwyg.scss
@@ -635,7 +635,8 @@
}
.protyle-wysiwyg:not([contenteditable]),
-.protyle-wysiwyg[data-readonly="true"] {
+.protyle-wysiwyg[data-readonly="true"],
+.protyle-wysiwyg__embed {
.img:hover .protyle-icons {
display: none;
}
diff --git a/app/src/block/Panel.ts b/app/src/block/Panel.ts
index 6ce2c81af5..bd57c0b17c 100644
--- a/app/src/block/Panel.ts
+++ b/app/src/block/Panel.ts
@@ -265,6 +265,9 @@ export class BlockPanel {
this.element.querySelectorAll(".block__edit").forEach((item: HTMLElement, index) => {
if (index < 5) {
this.initProtyle(item, index === 0 ? () => {
+ if (!document.contains(this.element)) {
+ return;
+ }
let targetRect;
if (this.targetElement && this.targetElement.classList.contains("protyle-wysiwyg__embed")) {
targetRect = this.targetElement.getBoundingClientRect();