From 318b07d1a9973b3d4f16882f68403dcc4cd2b069 Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Wed, 22 Nov 2023 05:48:03 -0800 Subject: [PATCH] feat: when doing modifier+f again in search, hides search and show browser search (#2526) --- assets/components/Search.vue | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/assets/components/Search.vue b/assets/components/Search.vue index ff24dce1..09754ab1 100644 --- a/assets/components/Search.vue +++ b/assets/components/Search.vue @@ -32,5 +32,18 @@ onKeyStroke("f", (e) => { } }); +onMounted(() => { + onKeyStroke( + "f", + (e) => { + if (e.ctrlKey || e.metaKey) { + e.stopPropagation(); + resetSearch(); + } + }, + { target: input.value }, + ); +}); + onUnmounted(() => resetSearch());