Open trotzig opened 7 years ago
You linked to localhost, so I can't see the image. Also, is this a duplicate of #136?
Lol, I wrote that up a little bit too quickly.
It's sort of related to that, but I wonder if we should just check for visibility and ignore if invisible.
This is the snapshot image. It's actually a little taller than what you see in this screenshot.
We have an example that renders a "Birthdate" selection list. This example ends up having a full rect of about five times the height of the screen. This is because
<option>
elements report being offset from the top by a lot.This is an example output from logging the
getBoundingClientRect()
value of a bunch of<option>
elements:In Chrome, these are reported differently:
This isn't a terrible problem in v3, because the resulting screenshot will be smaller. But in v4 (beta) we're constructing a screenshot box with the full dimensions. Which makes us end up with snapshots that look like this: http://localhost:4567/resource?file=snapshots%2FPEFicmlkZ2VkQWNjb3VudFNpZ25VcEZvcm0%2BIGRlZmF1bHQ%3D%2F%40medium%2Fcurrent.png