Page MenuHomePhabricator

Fix image prev/next cycling in lightboxes
ClosedPublic

Authored by epriestley on Mar 8 2018, 4:25 PM.
Tags
None
Referenced Files
F14788551: D19197.diff
Fri, Jan 24, 5:35 PM
F14768603: D19197.id45978.diff
Thu, Jan 23, 7:21 PM
Unknown Object (File)
Fri, Jan 17, 1:14 PM
Unknown Object (File)
Fri, Jan 3, 4:17 PM
Unknown Object (File)
Fri, Jan 3, 2:27 AM
Unknown Object (File)
Dec 20 2024, 11:14 PM
Unknown Object (File)
Dec 17 2024, 2:56 AM
Unknown Object (File)
Dec 10 2024, 1:19 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.