From 137e5039f9f01ed9cbb82d6fc21807710c498f52 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 23 Jun 2022 18:27:00 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E5=9C=A8=E6=95=B0=E5=AD=A6=E5=85=AC?= =?UTF-8?q?=E5=BC=8F=E8=BE=93=E5=85=A5=E6=A1=86=E4=B8=AD=E6=92=A4=E9=94=80?= =?UTF-8?q?=E5=88=B0=E6=9C=80=E5=90=8E=E4=B8=80=E6=AD=A5=EF=BC=8C=E5=86=8D?= =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E6=92=A4=E9=94=80=E4=BC=9A=E6=92=A4=E9=94=80?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E6=AD=A3=E6=96=87=E5=86=85=E5=AE=B9?= =?UTF-8?q?=EF=BC=8C=E4=BB=8E=E8=80=8C=E5=87=BA=E5=8F=91=20input=20?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/protyle/wysiwyg/input.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts index 7b8c11201..a2d27a877 100644 --- a/app/src/protyle/wysiwyg/input.ts +++ b/app/src/protyle/wysiwyg/input.ts @@ -116,6 +116,9 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range: } html = protyle.lute.SpinBlockDOM(html); } + // 在数学公式输入框中撤销到最后一步,再继续撤销会撤销编辑器正文内容,从而出发 input 事件 + protyle.toolbar.subElement.classList.add("fn__none"); + const tempElement = document.createElement("template"); tempElement.innerHTML = html; if (needRender && ( @@ -181,8 +184,6 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range: protyle.hint.render(protyle); } hideElements(["gutter"], protyle); - // 在数学公式输入框中撤销到最后一步,再继续撤销会撤销编辑器正文内容,从而出发 input 事件 - protyle.toolbar.subElement.classList.add("fn__none"); updateInput(html, protyle, id, type, todoOldHTML); };