[READ-ONLY] a fast, modern browser for the npm registry
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: cancel input blur when input is refocused (#1282)

authored by

Robin and committed by
GitHub
7f0291c9 83e1db66

+11 -4
+11 -4
app/components/Compare/PackageSelector.vue
··· 92 92 } 93 93 } 94 94 95 + const { start, stop } = useTimeoutFn(() => { 96 + isInputFocused.value = false 97 + }, 200) 98 + 95 99 function handleBlur() { 96 - useTimeoutFn(() => { 97 - isInputFocused.value = false 98 - }, 200) 100 + start() 101 + } 102 + 103 + function handleFocus() { 104 + stop() 105 + isInputFocused.value = true 99 106 } 100 107 </script> 101 108 ··· 151 158 size="medium" 152 159 class="w-full min-w-25 ps-7" 153 160 aria-autocomplete="list" 154 - @focus="isInputFocused = true" 161 + @focus="handleFocus" 155 162 @blur="handleBlur" 156 163 @keydown="handleKeydown" 157 164 />