current situation
- create a list of 10 files and feed it into gallery while using visual editor.
- now suppose you want to delete the 9th file. you press "remove image"
- it then jumps to the 1st file.
what should happen
jumps to the 8th file (the one before the removed target).
testing ground https://commons.wikimedia.org/w/index.php?title=Sandbox&oldid=919270949