Skip to content

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

:recycle: https://github.com/siyuan-note/siyuan/pull/14851

Vanessa7116be946c16
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index d9a4ba33ce..61a97621e1 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -471,11 +471,12 @@ export class WYSIWYG {
return;
}
const documentSelf = document;
- const protyleRect = protyle.element.getBoundingClientRect();
const wysiwygRect = protyle.wysiwyg.element.getBoundingClientRect();
const wysiwygStyle = window.getComputedStyle(protyle.wysiwyg.element);
- const mostLeft = wysiwygRect.left + (parseFloat(wysiwygStyle.paddingLeft) || 24) + 1;
- const mostRight = wysiwygRect.right - (parseFloat(wysiwygStyle.paddingRight) || 16) - 2;
+ const mostLeft = wysiwygRect.left + (parseInt(wysiwygStyle.paddingLeft) || 24) + 1;
+ const mostRight = wysiwygRect.right - (parseInt(wysiwygStyle.paddingRight) || 16) - 2;
+
+ const protyleRect = protyle.element.getBoundingClientRect();
const mostBottom = protyleRect.bottom;
const y = event.clientY;
const contentRect = protyle.contentElement.getBoundingClientRect();