= Problem =
If I'm reading an article on mobile web, click on a piece of media, then use the arrows to scroll through 1 or more images, when I close the media viewer I land back at the top of the article, rather than where I was when I clicked on a piece of media/opened the Media Viewer. As a result I have to then scroll back down to where I was in the article.
= Steps to Reproduce =
**Mobile web (iOS & Android):**
# Open https://en.m.wikipedia.org/wiki/Pacific_Ocean (or any article with several images)
# Scroll to the History section and expand it
# Tap on an image
# Use arrows to navigate to the next image (repeat several times if you want, shouldn't make a difference)
# Close media viewer
I will land in the History section (or wherever in the article I opened the first image from)
I land back at the top of the article
= Environments Observed =
=== Developer notes
The ImageOverlay.EVENT_EXIT fires an event when it closes.
Thus loadImageOverlay inside skins.minerva.scripts/init.js has access to the scrollTop position at the time an image is clicked and access to a point in time when the image is closed. Thus, it should be feasible to record scroll top position and restore it at the end of the event.
Ideally this would happen for all overlays which would take us to the OverlayManager in MobileFrontend. It seems feasible that this could do the same.