Skip to content

Commit

Permalink
use window.scrollto
Browse files Browse the repository at this point in the history
  • Loading branch information
HesterG committed Mar 17, 2023
1 parent 522fa67 commit 59e98c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web_src/js/features/repo-issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,10 @@ export function initRepoPullRequestReview() {
if (ancestorDiffBox.attr('data-folded') && ancestorDiffBox.attr('data-folded') === 'true') {
setFileFolding(ancestorDiffBox[0], ancestorDiffBox.find('.fold-file')[0], false);
}
$('html, body').scrollTop(commentDiv.offset().top - offset);
window.scrollTo({
top: commentDiv.offset().top - offset,
behavior: 'instant'
});
}
}
}
Expand Down

0 comments on commit 59e98c9

Please sign in to comment.