Fix slow Bootstrap modal selector

What does this MR do and why?

This MR fixes extremely slow Bootstrap modal selector, which caused a major slowdown in Rapid Diffs after a modal window was opened.

This selector was originally introduced by this MR and it can be simplified since we already fully migrated to panels.

Screenshots or screen recordings

Before After
image image
image image

How to set up and validate locally

  1. Enable rapid_diffs_on_commit_show feature flag
  2. Go to any commit
  3. Start a new comment on any diff line
  4. Cancel your comment
  5. Move your mouse to see the new discussion button move with the cursor
  6. Observe no lag

Merge request reports

Loading