fix search input

This commit is contained in:
Pete Matsyburka
2025-09-25 09:01:04 +03:00
parent 70c7ef4247
commit 18b89edc19
+2 -4
View File
@@ -15,13 +15,11 @@ export default class extends HTMLElement {
}) })
this.button.addEventListener('click', (event) => { this.button.addEventListener('click', (event) => {
if (!this.input.value && document.activeElement !== this.input) {
event.preventDefault() event.preventDefault()
if (this.input.value || document.activeElement === this.input) {
return
}
this.input.focus() this.input.focus()
}
}) })
} }