From d7057c438a00256afeac3269ff550332b47fa111 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 5 Aug 2022 19:36:45 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/5580 --- app/src/protyle/wysiwyg/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 74c66acf7..5e76dc252 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -617,9 +617,9 @@ export class WYSIWYG { } if (moveEvent.clientX > x - dragWidth + 8 && moveEvent.clientX < mostRight) { if ((dragElement.tagName === "IMG" && dragElement.parentElement.parentElement.style.display !== "block") || !isCenter) { - dragElement.style.width = (dragWidth + (moveEvent.clientX - x)) + "px"; + dragElement.style.width = Math.max(17, dragWidth + (moveEvent.clientX - x)) + "px"; } else { - dragElement.style.width = (dragWidth + (moveEvent.clientX - x) * 2) + "px"; + dragElement.style.width = Math.max(17, dragWidth + (moveEvent.clientX - x) * 2) + "px"; } } if (dragElement.tagName !== "IMG") {