From 7b444f65e3b95f5bf72439a888f15f3459fbd1b9 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 8 Apr 2023 22:34:15 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/7931 --- app/src/boot/globalShortcut.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/boot/globalShortcut.ts b/app/src/boot/globalShortcut.ts index e5f88acfc..7e88116bc 100644 --- a/app/src/boot/globalShortcut.ts +++ b/app/src/boot/globalShortcut.ts @@ -1174,7 +1174,7 @@ const fileTreeKeydown = (event: KeyboardEvent) => { } const liElements = Array.from(files.element.querySelectorAll(".b3-list-item--focus")); if (liElements.length === 0) { - if (event.key.startsWith("Arrow")) { + if (event.key.startsWith("Arrow") && !isCtrl(event)) { const liElement = files.element.querySelector(".b3-list-item"); if (liElement) { liElement.classList.add("b3-list-item--focus"); @@ -1301,7 +1301,7 @@ const fileTreeKeydown = (event: KeyboardEvent) => { } } return; - } else { + } else if (!isCtrl(event)) { files.element.querySelector('[select-end="true"]')?.removeAttribute("select-end"); files.element.querySelector('[select-start="true"]')?.removeAttribute("select-start"); if ((event.key === "ArrowRight" && !liElements[0].querySelector(".b3-list-item__arrow--open") && !liElements[0].querySelector(".b3-list-item__toggle").classList.contains("fn__hidden")) ||