Losing scroll position in a topic after flagging

Not sure if this is the right topic, but Discourse loses topic scroll position after flagging a post. Possibly also after some other events.

Is this iOS specific? Tested on 1.9 stable.

Still happens on Discourse 2.0.1. Not just after flagging, but also after moving messages to another topic etc.

No repro. I just entered a topic with 21 replies on try.discourse.org on the iPhone X (latest iOS), was at post 10, flagged the post, and there was no change to my scroll position.

Easy repro at Try. Flagged message number 977 for Something else. System returned me to message number 900 or something. Tried it twice, reproduced twice.

iPhone SE, latest iOS.


I think this is specific to that flag type, then.

No it is not. And also triggered by other post management events, as said earlier. But I’d need moderatorship on Try to repro those.

This is a shallow bug and 100% repro.

I’ve had it happen for both the Flag modal and edit history modal. It feels like the cause is the touch event to close the modal somehow gets seen as a tap on the post scroller. But I haven’t figured out a consistent repro and I can’t use dev tools because those are in my desktop browsers and it’s never happened for me on desktop. (would need to wire up iPad Safari to desktop Safari and I have Windows so no desktop Safari)

If it is some kind of over-sensitive or left-over touch event I have no idea how it could be solved (other than maybe an on close cancel all touch events?). If it’s a bubble, capture or z-index thing it might be fixable.

1 Like