Make directory name field closable with escape
This commit is contained in:
@@ -167,9 +167,10 @@ const keypress = e => {
|
|||||||
nav.children[i].fm_selected = true
|
nav.children[i].fm_selected = true
|
||||||
}
|
}
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
} else if (e.type === "keydown" && e.key === "Escape" && mode !== "viewing") {
|
} else if (e.type === "keydown" && e.key === "Escape" && (mode !== "viewing" || creating_dir)) {
|
||||||
// When escape is pressed we return to viewing mode
|
// When escape is pressed we return to viewing mode
|
||||||
viewing_mode()
|
viewing_mode()
|
||||||
|
creating_dir = false
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
}
|
}
|
||||||
@@ -411,6 +412,7 @@ onMount(() => {
|
|||||||
large_icons={large_icons}
|
large_icons={large_icons}
|
||||||
on:node_click={node_click}
|
on:node_click={node_click}
|
||||||
on:node_context={node_context}
|
on:node_context={node_context}
|
||||||
|
on:node_share_click={node_share_click}
|
||||||
on:node_settings={node_settings}
|
on:node_settings={node_settings}
|
||||||
on:node_select={node_select}
|
on:node_select={node_select}
|
||||||
/>
|
/>
|
||||||
|
Reference in New Issue
Block a user