Draft: Do not scroll to a collapsed file if user pressed Shift key
What does this MR do and why?
Fixes Collapsing file in diffs tab causes unexpected ... (#360204 - closed).
If you manually collapse a file in a merge request you'll be scrolled to it by default, which can be very disturbing to some users. This MR disables that behaviour if you're holding a 'Shift' key on your keyboard.
Screenshots or screen recordings
Before | After |
---|---|
Screen_Recording_2023-11-24_at_15.26.24 | Screen_Recording_2023-11-24_at_15.26.49 |
How to set up and validate locally
- Open any MR with changes
- Manually collapse a file while holding an 'Shift' key
- A file should be collapsed but your scroll position should stay the same
Edited by Stanislav Lashmanov