Skip to content

Commit a418096

Browse files
committed
bump 1.6.1
1 parent 90b490c commit a418096

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/docsify.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ function scrollActiveSidebar () {
216216

217217
li.classList.add('active');
218218
active = li;
219-
!hoveredOverSidebar && active.scrollIntoView();
219+
!hoveredOverSidebar && sticky.isSticky && active.scrollIntoView();
220220
}
221221

222222
window.removeEventListener('scroll', highlight);
@@ -293,8 +293,10 @@ function sticky () {
293293
return (function () {
294294
if (window.pageYOffset >= coverHeight || dom.classList.contains('hidden')) {
295295
document.body.classList.add('sticky');
296+
sticky.isSticky = true;
296297
} else {
297298
document.body.classList.remove('sticky');
299+
sticky.isSticky = false;
298300
}
299301
})()
300302
}

0 commit comments

Comments
 (0)