Bug 1669952 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

This one is not a bug on our side. Wikipedia is resetting the scroll position by calling scroll(0,0) on the window. Chrome will also reset the scroll position back to 0,0 if you scroll down, click away, and go back.
This one is not a bug on our side. Wikipedia is resetting the scroll position by calling scroll(0,0) on the window. Chrome will also reset the scroll position back to 0,0 if you scroll down, click away, and go back.

Edited to add, for posterity:
While investigating I observed that the scroll position actually gets changed three times after hitting back. The first one is from the restore code, which restores the scroll position that was there prior to navigating away. That one has a ScrollPositionUpdate with origin=Restore. The second one is from the search field getting focus and trigger the scroll to show code, [here](https://searchfox.org/mozilla-central/rev/803b368879fa332e8e2c1840bf1ec164f7ed2c32/layout/base/PresShell.cpp#3478-3493). The third is the scrollTo from JS. The second and third both generate a ScrollPositionUpdate with origin=Other.

Back to Bug 1669952 Comment 4