From 9b01734752159d432c75b260dde2ce6f51e2019d Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 25 Dec 2020 15:55:31 -0800 Subject: [PATCH] Require meta key to trigger search; change from "k" to "/"; closes #2785 --- .../scripts/components/dashboard/search/SearchContainer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/scripts/components/dashboard/search/SearchContainer.tsx b/resources/scripts/components/dashboard/search/SearchContainer.tsx index d552d2c1d..36c3ae871 100644 --- a/resources/scripts/components/dashboard/search/SearchContainer.tsx +++ b/resources/scripts/components/dashboard/search/SearchContainer.tsx @@ -9,7 +9,7 @@ export default () => { useEventListener('keydown', (e: KeyboardEvent) => { if ([ 'input', 'textarea' ].indexOf(((e.target as HTMLElement).tagName || 'input').toLowerCase()) < 0) { - if (!visible && e.key.toLowerCase() === 'k') { + if (!visible && e.metaKey && e.key.toLowerCase() === '/') { setVisible(true); } }