Browse Source

Add scroll-margin-top to account for sticky header (#16269)

Fixes #16263

Co-authored-by: zeripath <art27@cantab.net>
master
Jimmy Praet 1 year ago
committed by GitHub
parent
commit
eee03ae90a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      web_src/js/index.js
  2. 8
      web_src/less/_review.less

2
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();
}
}
}

8
web_src/less/_review.less

@ -173,3 +173,11 @@ a.blob-excerpt:hover {
.review-box > .segment {
border: none !important;
}
.pull.files.diff [id] {
scroll-margin-top: 99px;
@media @mediaMdAndDown {
scroll-margin-top: 130px;
}
}
Loading…
Cancel
Save