Skip to content

Commit

Permalink
Clear history when scrolled above the top item
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Jan 5, 2024
1 parent 0adef20 commit 5638256
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/scripts/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ $articles.forEach(($article) => {
$sidebarItems.forEach(($sidebarItem) =>
$sidebarItem.classList.remove("etna-article__sidebar-item--current"),
);
if (history.replaceState) {
history.replaceState(null, null, "#");
}
}
};

Expand Down

0 comments on commit 5638256

Please sign in to comment.