Skip to content

Commit 8e4536f

Browse files
viceiceforgejo-backport-action
authored andcommitted
fix: reset history.scrollRestoration if set to manual and no issue anchor in url
(cherry picked from commit ec4a0e1)
1 parent 1dc03cc commit 8e4536f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web_src/js/features/repo-issue.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,9 @@ export function initRepoPullRequestReview() {
478478
});
479479
}
480480
}
481+
} else if (window.history.scrollRestoration === 'manual') {
482+
// reset scrollRestoration to 'auto' if there is no hash in url and we set it to 'manual' before
483+
window.history.scrollRestoration = 'auto';
481484
}
482485

483486
$(document).on('click', '.show-outdated', function (e) {

0 commit comments

Comments
 (0)