From c53b14acef418a8caef77867ae52d886de1ec035 Mon Sep 17 00:00:00 2001 From: Charles Morgan Date: Wed, 14 Oct 2020 07:23:02 -0400 Subject: [PATCH] Close search bar on esacpe Allows the searchbar to be closed when a user clicks escape, just like in the browser. --- resources/scripts/components/server/Console.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/scripts/components/server/Console.tsx b/resources/scripts/components/server/Console.tsx index a4df1ccec..8d16e0e35 100644 --- a/resources/scripts/components/server/Console.tsx +++ b/resources/scripts/components/server/Console.tsx @@ -106,6 +106,9 @@ export default () => { return false; } + if (e.key === 'Escape') { + searchAddonBar.hidden(); + } return true; }); }