Skip to content

Commit

Permalink
Fix navigation for Firefox (#353)
Browse files Browse the repository at this point in the history
Refreshing the page with results and a #summary hash breaks on Firefox.
Explicitly setting the #home has a workaround cleanly shows the main page again.
  • Loading branch information
camillobruni authored Jan 25, 2024
1 parent 7c0931e commit 3d93f17
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions resources/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,12 @@ class MainBenchmarkClient {
}

_setLocationHash(hash) {
if (hash === "#home" || hash === "")
if (hash === "#home" || hash === "") {
window.location.hash = "#home";
this._removeLocationHash();
else
} else {
window.location.hash = hash;
}
}

_removeLocationHash() {
Expand Down

0 comments on commit 3d93f17

Please sign in to comment.