diff options
author | Jimmy Praet <jimmy.praet@telenet.be> | 2021-06-27 16:36:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-27 15:36:49 +0100 |
commit | eee03ae90a17242b481677a2f575e18e449de683 (patch) | |
tree | ec6fe23f7664c9d5131fedae32fd526c43c8e016 /web_src/js/index.js | |
parent | f533b5d5cf5178adf7f8f968cd7ded45c00ad9e6 (diff) | |
download | gitea-eee03ae90a17242b481677a2f575e18e449de683.tar.gz gitea-eee03ae90a17242b481677a2f575e18e449de683.zip |
Add scroll-margin-top to account for sticky header (#16269)
Fixes #16263
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'web_src/js/index.js')
-rw-r--r-- | web_src/js/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js index c00b3aaeb0..67548f5d9d 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -1343,7 +1343,7 @@ function initPullRequestReview() { $(`#code-comments-${id}`).removeClass('hide'); $(`#code-preview-${id}`).removeClass('hide'); $(`#hide-outdated-${id}`).removeClass('hide'); - $(window).scrollTop(commentDiv.offset().top); + commentDiv[0].scrollIntoView(); } } } |