How to reproduce:
- Navigate to a wiki page with images, e.g. MediaWiki Lightbox demo or English Wikipedia article on Earth.
- Scroll down and click on an image. The image should open in Media Viewer.
- Exit Media Viewer by clicking the "x" button on the top-right corner, or pressing the Esc key on the keyboard.
- Instead of returning to the page at the original scroll position, the scroll position is lost and the page returns to the top. This does not happen if exiting using the "Back" button on the browser.
So far this behaviour has happened on every page I've tried it on. I've followed the steps to locate broken scripts and the issue remains. Logging out also makes no difference.
Edit: If I click on a large image and exit before the image finishes loading, the scroll position is preserved.
Browser: Firefox 70.0.1 64-bit
OS: Windows 10 Home Version 1809 64-bit
Beta features: none enabled