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)
Sat, Jan 25, 12:00 AM
Unknown Object (File)
Fri, Jan 24, 9:47 PM
Unknown Object (File)
Fri, Jan 24, 5:35 PM
Unknown Object (File)
Thu, Jan 23, 7:21 PM
Unknown Object (File)
Jan 17 2025, 1:14 PM
Unknown Object (File)
Jan 3 2025, 4:17 PM
Unknown Object (File)
Jan 3 2025, 2:27 AM
Unknown Object (File)
Dec 20 2024, 11:14 PM
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.