-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Broken canvas image only in production #2360
Comments
This is an example from staging and production - https://share.getcloudapp.com/o0umyeny var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://html2canvas.hertzen.com/dist/html2canvas.min.js";
document.head.appendChild(script);
script.onload = function() {
var chart = document.querySelector('[class*="chartActions"] + [class*="verticalAlign"]')
html2canvas(chart).then(canvas => {
document.body.appendChild(canvas);
canvas.setAttribute("style", "position: absolute; top: 20px; left: 20px;")
});
} |
It was Profitwell script tag like here - #1593 (comment) |
I have this problem too, profitwell.js broke html2canvas :( |
Profitwell overwrite this method - getComputedStyle, so it not count |
Thanks for your reply! Your solution is works.
Is it safe? Rewrite to original getComputedStyle does not broke |
You are welcome! |
Ok, I understand. Thanks. |
If your code or another library overwrites browser methods like getComputedStyle, the bug is in that code/library |
Please make sure you are testing with the latest release of html2canvas.
Old versions are not supported and issues reported for them will be closed.
Please follow the general troubleshooting steps first:
Bug reports:
This bug can be reproduced only in production and only when page fully loaded. You can see it in this model example.
Main issue should be in the last loaded library or resource.
html2canvas version 1.0.0-rc.5 provide same result as #1868
html2canvas version 1.0.0-rc.7 fixed the throwing error bug, but provide new issue with strange almost blank image - video example
html2canvas version 1.0.0-alpha.12 also work without throwing error bug, but provide similar to 1.0.0-rc.7 issue with image - video example
Specifications:
The text was updated successfully, but these errors were encountered: