refactor(ui): Simplify Escape key navigation in device route

This commit is contained in:
Adam Shiervani 2025-02-26 00:58:00 +01:00
parent 6a2443c07c
commit 0588a35fd0
1 changed files with 2 additions and 8 deletions

View File

@ -478,16 +478,10 @@ export default function KvmIdRoute() {
</div>
<div
onKeyUp={e => {
e.stopPropagation();
}}
onKeyUp={e => e.stopPropagation()}
onKeyDown={e => {
e.stopPropagation();
if (e.key === "Escape") {
if (location.pathname !== "/other-session") {
navigate("..");
}
}
if (e.key === "Escape") navigate("..");
}}
>
<Modal