From 116ba89d63817718f6ee4e1d45ca8dc1389cc2bd Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 11 Dec 2022 11:57:52 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/3293 --- app/src/util/globalShortcut.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.ts index f8ad58f4d..483e45a30 100644 --- a/app/src/util/globalShortcut.ts +++ b/app/src/util/globalShortcut.ts @@ -793,14 +793,9 @@ const dialogArrow = (element: HTMLElement, event: KeyboardEvent) => { if (currentType) { getDockByType(currentType).toggleModel(currentType, true); } else { - let actionString = currentLiElement.getAttribute("data-action"); - if (actionString.indexOf(Constants.CB_GET_SCROLL) === -1) { - actionString = actionString ? (actionString + "," + Constants.CB_GET_SCROLL) : Constants.CB_GET_SCROLL; - } openFileById({ - id: currentLiElement.getAttribute("data-block-id") || currentLiElement.getAttribute("data-node-id"), - mode: currentLiElement.getAttribute("data-mode") as TEditorMode, - action: actionString.split(",") + id: currentLiElement.getAttribute("data-node-id"), + action: [Constants.CB_GET_SCROLL] }); } hideElements(["dialog"]); @@ -835,7 +830,7 @@ const openRecentDocs = () => { } let tabHtml = ""; response.data.forEach((item: any, index: number) => { - tabHtml += `
  • + tabHtml += `
  • ${unicode2Emoji(item.icon || Constants.SIYUAN_IMAGE_FILE, false, "b3-list-item__graphic", true)} ${escapeHtml(item.title)}
  • `;