Skip to content

Commit 41992cd

Browse files
committed
fix: scroll the sidebar to the active item when using keyboard shortcuts
1 parent 1ab0788 commit 41992cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

js/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Mousetrap.bind("b o r k", function () {
104104
function cycle(to, from) {
105105
from.removeClass("current");
106106
to.addClass("current");
107-
$.scrollTo(to.offset().top);
107+
to[0].scrollIntoView({ block: "center" });
108108
}
109109

110110
function getNextOrPreviousSibling(node, forward) {

0 commit comments

Comments
 (0)