Thread navigation in Changes tab causes unnecessary scrolling
How to reproduce
- Open Changes tab for a large MR with discussions
- Click on a date of any discussion (preferably deep down on the page)
- Manually scroll the page from top to bottom
Expectation: page scrolls without any issues
Reality: when you get close to the last navigated discussion you'll be scrolled back to it
Update: since discussion navigation is fixed by disabling Virtual scrolling the issue now occurs only if you click on a discussion.
Video reproduction
Screen_Recording_2022-08-31_at_21.29.36
This is happening because the anchor in the URL is not removed when we're scrolled to a discussion. If we scroll far away from this discussion it will be removed from the DOM. When we return to it it's inserted back again and the scrolling logic triggers as if we're just opened the page.
Edited by Stanislav Lashmanov