Page MenuHomePhabricator

Fix image prev/next cycling in lightboxes
ClosedPublic

Authored by epriestley on Mar 8 2018, 4:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 7, 11:02 AM
Unknown Object (File)
Tue, May 7, 7:54 AM
Unknown Object (File)
Fri, May 3, 7:35 AM
Unknown Object (File)
Tue, Apr 30, 9:53 AM
Unknown Object (File)
Thu, Apr 25, 1:38 AM
Unknown Object (File)
Thu, Apr 11, 9:22 AM
Unknown Object (File)
Mar 31 2024, 5:29 AM
Unknown Object (File)
Mar 31 2024, 5:29 AM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Mar 8 2018, 4:26 PM
epriestley requested review of this revision.
This revision was automatically updated to reflect the committed changes.