Skip to content
This repository

Please add any browser-specific quirks you come across.

Firefox

data URI hack causes newly appended items to be loaded twice

See Isotope issue #72

@yconst elaborates:

This behavior appears because of a browser synchronization issue between the src change to the proxy image and the original one back again: The thing is that the change to the proxy src may be performed 'fast enough' that it already triggers the load event once, which is then triggered again during the second change. Even if we check for src!=blank in load, as in @paulirish's last revision, it is possible that the second src change will be triggered between just after the first src assignment and the triggering of the load event, leaving us no control whatsoever over when to trigger the callback!

Hence, the len variable goes below 0 and the callback is called more than once. This is the reason for the gaps seen in @Apfelstrudel's example: Because of ImagesLoaded, Isotope is forced to re-append the same content more than once, leaving the previous element positions blank.

Google Chrome

Cached images have no width or height

I had to add setTimeout because Google Chrome was return 0 width and height for images, even though they were loaded and had dimension.

WebKit

webkit won't re-fire the events on this.src = this.src

@ajpiano kicked this all off in 2009

Something went wrong with that request. Please try again.