Losing scroll position in a topic after flagging


(ljpp) #1

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.


iOS 11 makes Discourse buggy?
(ljpp) #2

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


(Jeff Atwood) #3

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.


(ljpp) #4

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.

https://try.discourse.org/t/what-happens-when-a-topic-has-over-1000-replies/301/240


(Jeff Atwood) #5

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


(ljpp) #6

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.


(Mittineague) #7

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.