Closed (fixed)
Project:
PhotoSwipe - Responsive JavaScript Modal Image Gallery
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Sep 2017 at 16:05 UTC
Updated:
7 May 2018 at 06:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
anybodyPatch attached :)Edit: Contains debug output. Use -3.
Comment #3
anybodyCorrect patch attached. The other contained debug output, sorry.
Comment #4
anybodyComment #5
anybodySorry I had some patch format issues -.-
Comment #6
anybodyOne more addition to ensure there is no double event bindung in AJAX / context cases.
Comment #7
thomas.frobieter#6 is working properly! RTBC.
Comment #8
anybodyI finally did a complete code cleanup now. @thomas.frobieter would you be so nice to review that again? Patch attached.
Comment #9
thomas.frobieterIt's still working perfectly!
Comment #10
sunPatch still applies and doesn't look wrong to me, but as I didn't run into the stated problems, I'd like to wait for further confirmations before committing it.
Comment #11
sun.once() and .each() are substitutes — I believe you should only call one of both, but not both.
With .once(), you can pass the usual iteration callback as the second argument.
However, the jQuery result set is still filtered by .once(), so calling both in a chain is not wrong, just suboptimal, so leaving RTBC.
Comment #13
sunAfter studying this patch in more detail, it actually makes a lot of sense.
Thanks for reporting, contributing, patching, testing, and confirming! Committed to 8.x-1.x.
Comment #14
anybodyThank you, sun! :)