This problem is resolved by removing the style attribute (height, position), which is not supported by html2canvas and adds it after capturing a screenshot. In my case, I ran into a position problem.
$('.element').css('position','initial'); // Change absolute to initial $my_view = $('#my-view'); var useHeight = $('#my-view').prop('scrollHeight'); html2canvas($my_view[0], { height: useHeight, useCORS: true, allowTaint: true, proxy: "your proxy url", onrendered: function (canvas) { var imgSrc = canvas.toDataURL(); var popup = window.open(imgSrc); $('.element').css('position','absolute'); } });
It takes a screenshot of the entire screen, including the scrollable part. check this solution
source share