From 7116be946c1690862da95e8434d4618964c46ca4 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 19 May 2025 23:29:23 +0800 Subject: [PATCH] :recycle: https://github.com/siyuan-note/siyuan/pull/14851 --- app/src/protyle/wysiwyg/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index d9a4ba33c..61a97621e 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();