Fix work item description heading anchor links
What does this MR do and why?
Ensure that heading anchor links are shown.
This is a followup to !197122 (merged), which fixed an overflow problem but broke the functionality of heading anchor links.
References
Screenshots or screen recordings
| Before | After |
|---|---|
| Screen_Recording_2025-08-05_at_11.09.58 | Screen_Recording_2025-08-05_at_11.09.19 |
How to set up and validate locally
- Check out this branch
- Visit a work item
- Add a really long description that has at least one heading at the top, followed by some really tall images (Here's the example I used: example-description.md)
- Reload the page so that the description is truncated (if necessary, you may need to re-enable description truncation in the more actions menu on the work item)
- You should see that when the description is truncated:
- The anchor can be seen and clicked when the heading at the top of the description is hovered or when focus is moved to the anchor
- There is not a lot of extra whitespace at the bottom of the page
- You should see that when the description is expanded:
- The anchors for the headings in the description work as expected
- The full description is shown
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #558737 (closed), #513105 (closed)