Page MenuHomePhabricator

MMV close button fails to restore scroll in Firefox
Closed, DuplicatePublic

Description

I've been noticing for a week or two that if you open a MediaViewer overlay, then click the close button, the page is scrolled to the top. It was annoying me, so I isolated the problem and made a fix for it.

It's reproducible in Firefox with an empty profile, but not in Chromium. It only happens with the close button, not the browser's back button. I was able to reproduce it locally and confirm the fix which will shortly be uploaded.

Event Timeline

Change 553523 had a related patch set uploaded (by Tim Starling; owner: Tim Starling):
[mediawiki/extensions/MultimediaViewer@master] Fix failure to restore the scroll position on close in Firefox

https://gerrit.wikimedia.org/r/553523

As I wrote on Gerrit, the proposed fix may not be ideal: delaying the scroll causes visual flicker even in browsers unaffected by the bug, and the time before scroll may need to be very long to be reliable.