mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-05 16:28:49 +01:00
🐛 面板快捷键
This commit is contained in:
parent
18b9faa6dc
commit
80d5845434
1 changed files with 7 additions and 0 deletions
|
|
@ -1259,6 +1259,10 @@ const fileTreeKeydown = (event: KeyboardEvent) => {
|
|||
|
||||
const panelTreeKeydown = (event: KeyboardEvent) => {
|
||||
// 面板折叠展开操作
|
||||
const target = event.target as HTMLElement;
|
||||
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || hasClosestByAttribute(target, "contenteditable", null)) {
|
||||
return false;
|
||||
}
|
||||
if (!matchHotKey(window.siyuan.config.keymap.editor.general.collapse.custom, event) &&
|
||||
!matchHotKey(window.siyuan.config.keymap.editor.general.expand.custom, event) &&
|
||||
!event.key.startsWith("Arrow") && event.key !== "Enter") {
|
||||
|
|
@ -1317,6 +1321,9 @@ const panelTreeKeydown = (event: KeyboardEvent) => {
|
|||
if (activeItemElement.parentElement.parentElement.classList.contains("backlinkMList")) {
|
||||
tree = (model as Backlink).mTree;
|
||||
}
|
||||
if (!tree) {
|
||||
return false
|
||||
}
|
||||
if (event.key === "Enter") {
|
||||
tree.click(activeItemElement);
|
||||
event.preventDefault();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue