From 67242fbd4f3423d13e3fdb7a5b36aa9c89e4c32f Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 14 Jan 2026 12:53:40 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/16815 --- app/src/history/diff.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/history/diff.ts b/app/src/history/diff.ts index 3e1b01a44..db6d56fe4 100644 --- a/app/src/history/diff.ts +++ b/app/src/history/diff.ts @@ -95,7 +95,7 @@ const renderCompare = (app: App, element: HTMLElement) => { textElement.classList.add("fn__none"); leftElement.lastElementChild.classList.remove("fn__none"); textElement.previousElementSibling.classList.add("fn__none"); - leftEditor.protyle.options.history.snapshot = dialogContainerElement.querySelector(".b3-dialog__header code").getAttribute("data-snapshot"); + leftEditor.protyle.options.history.snapshot = dialogContainerElement.querySelectorAll(".b3-dialog__header code")[element.parentElement.getAttribute("data-type") === "update" ? 1 : 0].getAttribute("data-snapshot"); onGet({ data: response, protyle: leftEditor.protyle, @@ -208,6 +208,7 @@ export const showDiff = (app: App, data: { id: string, time: string }[]) => { } }); genHTML(left, right, dialog, "left"); + (document.activeElement as HTMLElement)?.blur(); }; const genHTML = (left: string, right: string, dialog: Dialog, direct: string) => { @@ -249,7 +250,7 @@ const genHTML = (left: string, right: string, dialog: Dialog, direct: string) => ${window.siyuan.languages.addAttr} ${response.data.addsLeft.length} - +