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 () {
|
bindEvent () {
|
||||||
const input = document.querySelector('.search input')
|
const search = document.querySelector('.search')
|
||||||
const panel = document.querySelector('.results-panel')
|
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 => {
|
input.addEventListener('input', e => {
|
||||||
const target = e.target
|
const target = e.target
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue