Flagging sometimes loses scroll position

Flagging a message occasionally causes the browser to lose scroll position – it jumps back XX number of messages.I don’t have a rock solid pattern to reproduce this, but it would seem to happen most on an iPhone (mine is 6s with iOS 12), longer topics (dozens or 100+ messages) and flagging with a custom reason.

This issue has been around a long time (longer than I have used Discourse). I finally decided to report as iOS 12 or Discourse 2.1 upgrade did not seem to make an improvement to this. Not a huge issue of course, as this only impacts busy forums and active flaggers, but kinda weird anyway.

1 Like

We need a solid repro here. Try on try.discourse.org, there is a 1000 reply topic in there to test with.

That’s the problem I have. I’ve narrowed it down to iPad Safari modals (Flag, edit revision history, post composer). The best I can come up with is that the “event” is propagating to the timeline scroller. But because I have so far been unable to cause it to happen consistently that’s still only a best guess.

1 Like

I have been testing this and this happens far more often than it does not – I’d say around 85% repro, but I can’t figure out how to get it to 100%.

@codinghorror But I did learn something – the event does not have to be flagging. I just temporarily closed a topic of 419 posts, and I was bounced back to message number 336.