Skip to content

Commit e0c9898

Browse files
committed
fix lint
1 parent 43113ee commit e0c9898

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

web_src/js/features/repo-issue.js

+4
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,10 @@ export async function handleReply($el) {
438438

439439
export function initRepoPullRequestReview() {
440440
if (window.location.hash && window.location.hash.startsWith('#issuecomment-')) {
441+
// set scrollRestoration to 'manual' when there is a hash in url, so that the scroll position will not be remembered after refreshing
442+
if (window.history.scrollRestoration !== 'manual') {
443+
window.history.scrollRestoration = 'manual';
444+
}
441445
const commentDiv = $(window.location.hash);
442446
if (commentDiv) {
443447
// get the name of the parent id

0 commit comments

Comments
 (0)