From 0588a35fd00b1937d359108ffe4cf283dc69875c Mon Sep 17 00:00:00 2001 From: Adam Shiervani Date: Wed, 26 Feb 2025 00:58:00 +0100 Subject: [PATCH] refactor(ui): Simplify Escape key navigation in device route --- ui/src/routes/devices.$id.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ui/src/routes/devices.$id.tsx b/ui/src/routes/devices.$id.tsx index f2b7aac..7005080 100644 --- a/ui/src/routes/devices.$id.tsx +++ b/ui/src/routes/devices.$id.tsx @@ -478,16 +478,10 @@ export default function KvmIdRoute() {
{ - 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(".."); }} >