fix search input
This commit is contained in:
@@ -15,13 +15,11 @@ export default class extends HTMLElement {
|
|||||||
})
|
})
|
||||||
|
|
||||||
this.button.addEventListener('click', (event) => {
|
this.button.addEventListener('click', (event) => {
|
||||||
event.preventDefault()
|
if (!this.input.value && document.activeElement !== this.input) {
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
if (this.input.value || document.activeElement === this.input) {
|
this.input.focus()
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.input.focus()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user