Skip to content

Commit 86a7532

Browse files
committed
fix: fixed focus in case of multiple occurrences
1 parent 269effb commit 86a7532

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/SearchInput.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
ref="inputRef"
1010
type="search"
1111
data-search-input="true"
12+
:data-shortcut-enabled="shortcutListenerEnabled"
1213
:value="modelValue"
1314
v-bind="attrsWithoutStyles"
1415
@input="onInput"
@@ -125,7 +126,7 @@ export default defineComponent({
125126
) {
126127
e.preventDefault()
127128
const allVisibleSearchInputs = [].slice
128-
.call(document.querySelectorAll('[data-search-input]'))
129+
.call(document.querySelectorAll('[data-search-input="true"]:not([data-shortcut-enabled="false"])'))
129130
.filter((el: HTMLElement) => {
130131
return !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length)
131132
})

0 commit comments

Comments
 (0)