You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and I'd like to suggest to consider changing this line: children: 'a',
to children: 'a.photoswipe',
and use <a class="photoswipe"><img [...]></a> in the markup example.
Alternatively, as shortcut like ps could be used as class for convenience.
Not because it's wrong or wouldn't work, but because it introduces a high risk, if people using it on a broader container. In that case all links in the container are handled as photoswipe links. As a side-effect this results in broken modals for each link that shouldn't be a photoswipe link:
(Saying "The image could not be loaded")
I know this additional class also has downsides, but on the other hand there might be some frustration, until you find the too broad children match...
So I thought it might make sense to raise this point and discussion.
Thank you!
The text was updated successfully, but these errors were encountered:
https://photoswipe.com/ has this example on the frontpage:
and I'd like to suggest to consider changing this line:
children: 'a',
to
children: 'a.photoswipe',
and use
<a class="photoswipe"><img [...]></a>
in the markup example.Alternatively, as shortcut like
ps
could be used as class for convenience.Not because it's wrong or wouldn't work, but because it introduces a high risk, if people using it on a broader container. In that case all links in the container are handled as photoswipe links. As a side-effect this results in broken modals for each link that shouldn't be a photoswipe link:

(Saying "The image could not be loaded")
I know this additional class also has downsides, but on the other hand there might be some frustration, until you find the too broad children match...
So I thought it might make sense to raise this point and discussion.
Thank you!
The text was updated successfully, but these errors were encountered: