Defect #43143 » 0001-Adjust-scrolling-to-keep-Edit-heading-visible.patch
app/assets/javascripts/application-legacy.js | ||
---|---|---|
23 | 23 |
} |
24 | 24 | |
25 | 25 |
function showAndScrollTo(id, focus) { |
26 |
$('#'+id).show(); |
|
27 |
if (focus !== null) { |
|
28 |
$('#'+focus).focus(); |
|
26 |
const el = document.getElementById(id); |
|
27 |
if (el) { |
|
28 |
el.style.display = ''; // show() |
|
29 |
if (focus) document.getElementById(focus)?.focus({ preventScroll: true }); |
|
30 |
el.scrollIntoView({ behavior: 'smooth' }); |
|
29 | 31 |
} |
30 |
$('html, body').animate({scrollTop: $('#'+id).offset().top}, 100); |
|
31 | 32 |
} |
32 | 33 | |
33 | 34 |
function toggleRowGroup(el) { |
app/assets/stylesheets/application.css | ||
---|---|---|
796 | 796 |
/* Prevent content from being hidden behind a #sticky-issue-header when scrolling via anchor links. */ |
797 | 797 |
.controller-issues.action-show div.wiki a[name], |
798 | 798 |
.controller-issues.action-show #history div[id^="note-"], |
799 |
.controller-issues.action-show #history div[id^="change-"] { |
|
799 |
.controller-issues.action-show #history div[id^="change-"], |
|
800 |
.controller-issues.action-show #update { |
|
800 | 801 |
scroll-margin-top: 50px; |
801 | 802 |
} |
802 | 803 |
app/assets/stylesheets/responsive.css | ||
---|---|---|
868 | 868 |
/* Prevent content from being hidden behind #sticky-issue-header and project-jump when scrolling via anchor links. */ |
869 | 869 |
.controller-issues.action-show div.wiki a[name], |
870 | 870 |
.controller-issues.action-show #history div[id^="note-"], |
871 |
.controller-issues.action-show #history div[id^="change-"] { |
|
871 |
.controller-issues.action-show #history div[id^="change-"], |
|
872 |
.controller-issues.action-show #update { |
|
872 | 873 |
scroll-margin-top: 114px; |
873 | 874 |
} |
874 | 875 |
} |