Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error event so for firefox #234

Merged
merged 1 commit into from
Sep 12, 2015
Merged

Conversation

stevemayhew
Copy link
Contributor

This error only fires on firefox, and when it does it logs a console
error (because ‘event’ is not declared).

Also, note that load event is notoriously unreliable for images (Chrome
will not fire it if the image is loaded from cache). Stay tuned next
for more reliable version of this code that will always fire the
complete. For now this fixes the console error message in FF.

Here's the CodePen that shows the fix working: http://s.codepen.io/stevemayhew/debug/dYYKvV

This error only fires on firefox, and when it does it logs a console
error (because ‘event’ is not declared).

Also, note that load event is notoriously unreliable for images (Chrome
will not fire it if the image is loaded from cache).  Stay tuned next
for more reliable version of this code that will always fire the
complete.   For now this fixes the console error message in FF.
desandro added a commit that referenced this pull request Sep 12, 2015
Add missing event obj in LazyLoader
@desandro desandro merged commit b1c125e into metafizzy:master Sep 12, 2015
@desandro
Copy link
Member

Thanks so much for this patch! A shame that JSHint totally missed this — I guess event is special.

Interestingly, no one has reported issues with cached images and lazy loading. All the same, I look forward to what you have in store.

Thanks again!

@stevemayhew
Copy link
Contributor Author

Your welcome, Flickity is awesome

From Steve's iPhone

On Sep 12, 2015, at 9:25 AM, David DeSandro notifications@github.com wrote:

Thanks so much for this patch! A shame that JSHint totally missed this — I guess event is special.

Interestingly, no one has reported issues with cached images and lazy loading. All the same, I look forward to what you have in store.

Thanks again!


Reply to this email directly or view it on GitHub.

@stevemayhew stevemayhew deleted the bugfix branch September 23, 2015 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants