Skip to content

Commit

Permalink
When no hash, jump to start of document (#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilslindemann authored May 28, 2023
1 parent 3afae26 commit 8c575fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/source/Window.mint
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ module Window {
`requestAnimationFrame(() => {
if (window.location.hash) {
window.location.href = window.location.hash
} else {
window.scrollTo(0, 0)
}
})
`
Expand Down

0 comments on commit 8c575fb

Please sign in to comment.