Fix keyboard shortcut conflict in filesystem

This commit is contained in:
2025-04-17 16:16:35 +02:00
parent 910cb5d75a
commit 9cc0fe1f38
2 changed files with 7 additions and 1 deletions

View File

@@ -169,6 +169,13 @@ let moving_items = []
let shift_pressed = false
let last_selected_node = -1
const keypress = (e: KeyboardEvent) => {
if (
(document.activeElement as any).type !== undefined &&
(document.activeElement as any).type === "text"
) {
return // Prevent shortcuts from interfering with input fields
}
if (e.key === "Shift") {
shift_pressed = e.type === "keydown"
} else if (e.type === "keydown" && e.key === "a" && e.ctrlKey) {