1up-lab / contao-full-background-images

Full background images extension for the Contao Open Source CMS
MIT License
4 stars 3 forks source link

Backstretch resize() method doesn't anticipate on unloaded image (ratio) #13

Closed bytehead closed 10 years ago

bytehead commented 10 years ago

At least on iOS6, but probably on more browsers, the resize-event can be triggered before the image has been loaded and/or the ratio of the image is know.

The method already has a try/catch block in place for IE7, but it should also just check for isNaN() on the calculated bgHeight so it can stop further processing in that case.