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
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue