From 8874286dc5c51f11081d59d713ca7909d1e5aea8 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 30 Aug 2022 00:06:50 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/4901 --- app/src/util/history.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/src/util/history.ts b/app/src/util/history.ts index 34fc86e24..79e8dbd49 100644 --- a/app/src/util/history.ts +++ b/app/src/util/history.ts @@ -262,8 +262,8 @@ export const openHistory = () => {
-
- +
+
@@ -328,6 +328,15 @@ export const openHistory = () => { renderDoc(firstPanelElement, 1); }); }); + firstPanelElement.querySelector(".b3-text-field").addEventListener("input", (event: KeyboardEvent) => { + if (event.isComposing) { + return; + } + renderDoc(firstPanelElement, 1); + }); + firstPanelElement.querySelector(".b3-text-field").addEventListener("compositionend", () => { + renderDoc(firstPanelElement, 1); + }); renderDoc(firstPanelElement, 1); const repoElement = dialog.element.querySelector('#historyContainer [data-type="repo"]'); const selectElement = repoElement.querySelector(".b3-select") as HTMLSelectElement; @@ -367,7 +376,7 @@ export const openHistory = () => { } }); break; - } else if (target.classList.contains("b3-list-item__action") && type === "rollback" && !window.siyuan.config.readonly) { + } else if (target.classList.contains("b3-list-item__action") && type === "rollback" && !window.siyuan.config.readonly) { confirmDialog("⚠️ " + window.siyuan.languages.rollback, `${window.siyuan.languages.rollbackConfirm.replace("${date}", target.parentElement.textContent.trim())}`, () => { const dataType = target.parentElement.getAttribute("data-type"); if (dataType === "assets") {