Skip to content

Commit 0523b00

Browse files
author
Nick Gashkov
authored
fix: replace history in 'CommentScrollArrow' (vas3k#1002)
Assigning the value behaves as a 'location.push' and adds a new item into the 'history' which makes it harded for users to jump to the previous **page** i.e. feed. Replacing on the other hand, allows to go to the previous page with a single "go back".
1 parent ba6856f commit 0523b00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/static/js/components/CommentScrollArrow.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default {
5757
window.addEventListener("scroll", onScroll);
5858
onScroll();
5959
60-
document.location.hash = `#${el.id}`;
60+
document.location.replace(`#${el.id}`);
6161
},
6262
scrollExtreme(direction) {
6363
if (direction === "Down") {

0 commit comments

Comments
 (0)