Page MenuHomePhabricator

Scroll position lost when exiting Media Viewer
Closed, DuplicatePublic

Description

How to reproduce:

  1. Navigate to a wiki page with images, e.g. MediaWiki Lightbox demo or English Wikipedia article on Earth.
  1. Scroll down and click on an image. The image should open in Media Viewer.
  1. Exit Media Viewer by clicking the "x" button on the top-right corner, or pressing the Esc key on the keyboard.
  1. 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.

Technical details:
Browser: Firefox 70.0.1 64-bit
OS: Windows 10 Home Version 1809 64-bit
Skin: Vector
Beta features: none enabled