tsayen / dom-to-image

Generates an image from a DOM node using HTML5 canvas
Other
10.23k stars 1.68k forks source link

Can't capture scrolled elements #289

Open dushyanttessact opened 5 years ago

dushyanttessact commented 5 years ago

Use case: description, code

jsfiddle

scroll down and then capture the screen, check screenshot it will only show the top elements and not the scrolled ones.

andomain commented 4 years ago

I am also having this issue

MSCAU commented 4 years ago

You can turn off the overflow, run DomToImage, then turn it back on again. If that's too distracting to the user, append a clone of your chosen DIV with overflow: visible at the bottom of the page. I do this on https://beatjosh.com/budgets/FY2019/CTH (click the SNAPSHOT button in the top right toolbar). Not ideal, but perhaps good enough.

kalandher commented 1 year ago

is there a solution for this? i wanted to capture only the scrolled content. for e.g if there are 100 rows in a table and I scrolled at 50th and do capture is should get from 50th row but now its going back to top. Even turnoff overflow is not helping here as it always scroll top to before capture and my scrolled content is not captured.

HenryLin0914 commented 1 year ago

+1