Page MenuHomePhabricator

If an image file is used multiple times within a page; MediaViewer always opens the first reference to it
Closed, DuplicatePublic

Description

I'm not sure if this is a bug or not; but I did not find any information about it on the extension page, or its talk page.

If an image file is used more than once on a page, MediaViewer always opens the first reference to it.

This is visible on Reading/Multimedia/Media_Viewer page. File:Media_Viewer_-_New_Design_-_Default_Lightbox.png is inserted two times, once as a thumb, and once within a gallery. The caption is different for both images.

2019-10-23_08-50-06.png (602×1 px, 185 KB)

2019-10-23_08-50-27.png (497×1 px, 206 KB)

No matter which image is clicked, MediaViewer always opens the first reference (the thumb), and displays its caption. When navigating to the next image, the same image is shown again.

This behavior is a bit confusing on pages with lots of images, as the MediaViewer navigation might not work as the user would expect.