How to reproduce:
1. Navigate to a wiki page with images, e.g. [[ https://www.mediawiki.org/wiki/Lightbox_demo | MediaWiki Lightbox demo ]] or [[ https://en.wikipedia.org/wiki/Earth | English Wikipedia article on Earth ]].
2. Scroll down and click on an image. The image should open in Media Viewer.
3. Exit Media Viewer by clicking the "x" button on the top-right corner, or pressing the Esc key on the keyboard.
4. 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 [[ https://www.mediawiki.org/wiki/Help:Locating_broken_scripts | 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