mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(ElementHandle.screenshot): account for scroll (#1323)
Currently, `elementHandle.screenshot` passes bounding box into the `page.captureScreenshot` method. This is wrong since `captureScreenshot` accepts viewport, not bounding box. This patch uses layout metrics to convert bounding box into viewport. Fixes #1315.
This commit is contained in:
committed by
Andrey Lushnikov
parent
2c8f658815
commit
b0b22199f9
BIN
test/golden/screenshot-element-scrolled-into-view.png
Normal file
BIN
test/golden/screenshot-element-scrolled-into-view.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 168 B |
Reference in New Issue
Block a user