Find scrollable parent els for panels

What does this MR do and why?

When project studio is enabled, look for the parent panel scrollable element rather than using window or document.scrollingElement when attempting to programatically scroll to a specific element.

References

Screenshots or screen recordings

Before After
Screen_Recording_2025-09-09_at_17.16.51 Screen_Recording_2025-09-09_at_17.12.38

How to set up and validate locally

Regular scroll to element

  1. Visit an MR
  2. Add a couple of threads/discussions to the MR
  3. Try to use the next/previous open thread buttons or keyboard shortcuts

Resize observer scrolling

  1. Visit an issue/epic with a lot of comments
  2. use the 'copy link' button on one of the comments (ensure it's beyond the first page of notes/comments that load)
  3. Visit the link you copied and check the comment is scrolled down to once it loads

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.

Edited by Jack Chapman

Merge request reports

Loading