Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Commit

Permalink
Ensure that highlighted anchor link is always in view (fixes #23)
Browse files Browse the repository at this point in the history
  • Loading branch information
dotherightthing committed Jan 8, 2021
1 parent c15d5e6 commit 5eaad3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/_frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ const wpdtrtAnchorlinksUi = {

$anchorLinkActive.addClass('wpdtrt-anchorlinks__list-link-active');

$anchorLinkActive.get(0).scrollIntoView();

wpdtrtAnchorlinksUi.showScrollProgress();
}
});
Expand Down

0 comments on commit 5eaad3e

Please sign in to comment.