Skip to content

Commit

Permalink
fix(event): highlight sidebar when clicked, fixed #86
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Feb 21, 2017
1 parent 22cfb73 commit 6b7fd41
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/core/event/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ export function btn (el) {
el = dom.getNode(el)
dom.on(el, 'click', toggle)

if (isMobile) {
const sidebar = dom.getNode('.sidebar')
const sidebar = dom.getNode('.sidebar')

dom.on(sidebar, 'click', () => {
toggle()
setTimeout(() => getAndActive(sidebar, true, true), 0)
})
}
dom.on(sidebar, 'click', () => {
isMobile && toggle()
setTimeout(() => getAndActive(sidebar, true, true), 0)
})
}

export function sticky () {
Expand Down

0 comments on commit 6b7fd41

Please sign in to comment.