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.