mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
fix(search): not work in mobile
This commit is contained in:
parent
be6a97af92
commit
3941304fda
@ -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…
x
Reference in New Issue
Block a user