Skip to content

Commit d96cef1

Browse files
author
Earl Warren
committed
Merge pull request '[v9.0/forgejo] fix: reset history.scrollRestoration if set to manual and no issue anchor in url' (go-gitea#5753) from bp-v9.0/forgejo-ec4a0e1 into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5753 Reviewed-by: Otto <[email protected]> Reviewed-by: Michael Kriese <[email protected]>
2 parents 3f58b8d + 8e4536f commit d96cef1

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)