Fix keyboard shortcut conflict in filesystem
This commit is contained in:
@@ -169,6 +169,13 @@ let moving_items = []
|
|||||||
let shift_pressed = false
|
let shift_pressed = false
|
||||||
let last_selected_node = -1
|
let last_selected_node = -1
|
||||||
const keypress = (e: KeyboardEvent) => {
|
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") {
|
if (e.key === "Shift") {
|
||||||
shift_pressed = e.type === "keydown"
|
shift_pressed = e.type === "keydown"
|
||||||
} else if (e.type === "keydown" && e.key === "a" && e.ctrlKey) {
|
} else if (e.type === "keydown" && e.key === "a" && e.ctrlKey) {
|
||||||
|
@@ -106,7 +106,6 @@ const video_keydown = (e: KeyboardEvent) => {
|
|||||||
class="video"
|
class="video"
|
||||||
on:pause={() => playing = false }
|
on:pause={() => playing = false }
|
||||||
on:play={() => playing = true }
|
on:play={() => playing = true }
|
||||||
on:ended={() => dispatch("open_sibling", 1)}
|
|
||||||
on:keydown={video_keydown}
|
on:keydown={video_keydown}
|
||||||
use:video_position={() => $nav.base.sha256_sum.substring(0, 8)}
|
use:video_position={() => $nav.base.sha256_sum.substring(0, 8)}
|
||||||
>
|
>
|
||||||
|
Reference in New Issue
Block a user