From 79c2541dc96d84fdb2ca24789ddaec00c5144d3f Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Thu, 25 Dec 2025 14:18:12 +0530 Subject: [PATCH] fix: focus search input on '/' key press --- components/MaintainerList.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components/MaintainerList.vue b/components/MaintainerList.vue index 0d82545..72433b4 100644 --- a/components/MaintainerList.vue +++ b/components/MaintainerList.vue @@ -68,6 +68,16 @@ onMounted(() => { e.preventDefault(); searchInputRef.value?.focus(); } + if ( + e.key === "/" && + !( + e.target instanceof HTMLInputElement || + e.target instanceof HTMLTextAreaElement + ) + ) { + e.preventDefault(); + searchInputRef.value?.focus(); + } }); });