terrymun / Fluidbox

Replicating and improving the lightbox module seen on Medium with fluid transitions.
http://terrymun.github.io/Fluidbox/
Other
2.15k stars 166 forks source link

Duplicate .fluidbox__overlay if href is wrong path (404) #179

Closed l2aelba closed 8 years ago

l2aelba commented 8 years ago

I just report a bit bug here : When href set with a wrong path

Example :

<a class="fluidbox" href="if_this_is_a_wrong_path"><img src="http://placeimg.com/640/480/arch.jpg"></a>

When I clicking <a> so .fluidbox__overlaywill appended each time. _(10 times = 10 .fluidbox_overlay)

terrymun commented 8 years ago

This arises due to transitionend events not being fired on the ghost element if the image fails to load, because no calculations and hence scaling will take place.

This issue is fixed in 465adbb, and will be included in the next release.