Page MenuHomePhabricator

Gallery images do not trigger mobile media viewer
Closed, DeclinedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
I navigate to the file page

What should have happened instead?:

The mobile media viewer should have opened

Other information (browser name/version, screenshots, etc.):

This happens because the gallery is initialized with JavaScript after the media viewer is wired up. We could either adapt mobile to support eligible links added via JavaScript or introduce a hook that wires up the gallery.

`
// currently

$( 'a.image' ).on( 'click', loadMediaViewer)

// possible
$( document ).on( 'click', 'a.image', loadMediaViewer)