I have an interesting problem with download table as jpeg. My code is:
html2canvas(document.getElementById("planety_table"), {
onrendered: function(canvas) {
document.getElementById('myImg').src = canvas.toDataURL("image/jpeg");
var a = document.createElement('a');
a.href = document.getElementById('myImg').src;
a.download = "tabulka_planety.jpg";
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
}
});
In notebook, this code working fine. In Huawei phone too. But in Samsung Galaxy phone not - only when I make one touch to display after the button is clicked. Can you help me with this problem?
Thanks, best regards