check https://docsify.js.org/#/cdn?id=other-cdn click other-cdn, it won't be highlighted.
it is because sidebar highlight is computed from scroll position, but several headers in the last will never appear on top of viewport
why not getAndActive(sidebar, true, true) when isMobile is false?
getAndActive(sidebar, true, true)
isMobile
The sidebar is hidden by default on the mobile. No need to scroll when the highlight.
no, I mean even if its not in mobiles, getAndActive should be perform?
Actually I just check the viewport less than 600px as a mobile.
大佬orz,
我英文不好,就是想问不在viewport大于600px时getAndActive有什么考虑么
fix(event): highlight sidebar when clicked, fixed #86
Activity
reverland commentedon Feb 20, 2017
why not
getAndActive(sidebar, true, true)whenisMobileis false?QingWei-Li commentedon Feb 20, 2017
The sidebar is hidden by default on the mobile. No need to scroll when the highlight.
reverland commentedon Feb 20, 2017
no, I mean even if its not in mobiles, getAndActive should be perform?
QingWei-Li commentedon Feb 20, 2017
Actually I just check the viewport less than 600px as a mobile.
reverland commentedon Feb 20, 2017
大佬orz,
我英文不好,就是想问不在viewport大于600px时getAndActive有什么考虑么
fix(event): highlight sidebar when clicked, fixed #86