matiasgali / guillotine

jQuery plugin to crop images within an area (fully responsive), allowing to drag (touch support), zoom and rotate.
http://guillotine.js.org
326 stars 100 forks source link

Fix plugin not initializing when image cached #29

Closed JustinTBayer closed 9 years ago

JustinTBayer commented 9 years ago

The load event isn't triggered in some browsers if the image is cached. This leads to the plugin not initializing. Fixed in demo code. Am not familiar enough with js/jQuery to explore option of fix within Guillotine code itself.

Issue can be reliably replicated in Firefox 36 by loading page then opening page again in same or new tab. Refreshing does not cause issue. Issue is not caused in github.io example, possibly because new image source is specific on each page load by script.

matiasgali commented 9 years ago

@JustinTBayer I appologize for taking so long to review this.

I didn't merge to add a few small adjustments and comments to make the demo as clear as possible but I give you full credit for the work done.

Thanks for contributing!