HomePhabricator

Fix image prev/next cycling in lightboxes

Description

Fix image prev/next cycling in lightboxes

Summary:
See https://discourse.phabricator-community.org/t/lightbox-not-working/1201/3. The lightbox code is fragile and currently relies on simulating a click on the actual "<a />" tag surrounding other images in the document.

This breaks the prev/next links which ignore the event because it there's no "<img />".

Instead, don't simulate clicks and just call the code we want directly.

Test Plan: Added several images to a page, used lightbox prev/next buttons to cycle between them.

Differential Revision: https://secure.phabricator.com/D19197

Details

Provenance
epriestleyAuthored on Mar 8 2018, 4:22 PM
epriestleyPushed on Mar 8 2018, 4:28 PM
Differential Revision
D19197: Fix image prev/next cycling in lightboxes
Parents
rP98cac2cc2994: Always serve "{meme ...}" from the CDN domain, never from the primary domain
Branches
Unknown
Tags
Unknown
Build Status
Buildable 19795
Build 26817: Run Core Tests