Skip to content

Commit

Permalink
fix(search): not work in mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Feb 11, 2017
1 parent be6a97a commit 3941304
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/plugins/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3941304

Please sign in to comment.