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

Enforce colorstop min 0 #1743

Merged
merged 2 commits into from
Apr 7, 2019
Merged

Conversation

ahebrank
Copy link
Contributor

In our experience, it's possible for the colorstop.stop to be less than zero, but only in Firefox. When this happens, you get the dreaded "IndexSizeError: Index or size is negative or greater than the allowed amount".

This often manifests as -0 or a very small negative number, so it seems pretty safe to just force this to zero.

Replicating this error is not easy and I don't currently have a live site to demonstrate it with, so I'll try to find out more. We're currently patching dist/html2canvas.js.

@niklasvh niklasvh merged commit 349bbf1 into niklasvh:master Apr 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants