fix(search): not work in mobile
This commit is contained in:
parent
be6a97af92
commit
3941304fda
1 changed files with 4 additions and 2 deletions
|
|
@ -180,9 +180,11 @@ class SearchComponent {
|
|||
}
|
||||
|
||||
bindEvent () {
|
||||
const input = document.querySelector('.search input')
|
||||
const panel = document.querySelector('.results-panel')
|
||||
const search = document.querySelector('.search')
|
||||
const input = search.querySelector('.search input')
|
||||
const panel = search.querySelector('.results-panel')
|
||||
|
||||
search.addEventListener('click', e => e.target.tagName !== 'A' && e.stopPropagation())
|
||||
input.addEventListener('input', e => {
|
||||
const target = e.target
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue