From 7eec8a6b85c5c68ae73a1591618f8c36e0e97a22 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 25 Dec 2023 21:31:00 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E5=8A=A0=E5=BC=BA=E7=B2=98=E8=B4=B4?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/protyle/wysiwyg/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 76f20d87b..137b64f50 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -1527,6 +1527,11 @@ export class WYSIWYG { event.stopPropagation(); return; } + if (!hasClosestByAttribute(event.target, "contenteditable", "true")) { + event.stopPropagation(); + event.preventDefault(); + return; + } const blockElement = hasClosestBlock(event.target); if (blockElement && !getContenteditableElement(blockElement)) { event.stopPropagation();