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 |
|---|---|
![]() |
![]() |
![]() |
![]() |
How to set up and validate locally
- Enable
rapid_diffs_on_commit_showfeature flag - Go to any commit
- Start a new comment on any diff line
- Cancel your comment
- Move your mouse to see the new discussion button move with the cursor
- Observe no lag



