mirror of https://github.com/jetkvm/kvm.git
refactor(ui): Simplify Escape key navigation in device route
This commit is contained in:
parent
6a2443c07c
commit
0588a35fd0
|
@ -478,16 +478,10 @@ export default function KvmIdRoute() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
onKeyUp={e => {
|
onKeyUp={e => e.stopPropagation()}
|
||||||
e.stopPropagation();
|
|
||||||
}}
|
|
||||||
onKeyDown={e => {
|
onKeyDown={e => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (e.key === "Escape") {
|
if (e.key === "Escape") navigate("..");
|
||||||
if (location.pathname !== "/other-session") {
|
|
||||||
navigate("..");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Modal
|
<Modal
|
||||||
|
|
Loading…
Reference in New Issue