You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Page shots are wider than the viewport when content overflows hidden #115
Untiled page shots use page.screenshot({ fullPage: true }), which captures the document's scroll width, not the viewport width. If an element sits off-canvas and the page hides it with overflow-x: hidden on body, the user never sees it and can't scroll to it, but the shot comes out wider than the viewport, with the page squeezed into the left part.
The tiled path already uses width (the viewport) for its area, so tall pages don't have this problem and short ones do.
Suggested fix:
Shoot the untiled page with clip: { x: 0, y: 0, width, height: scrollHeight } too, so both paths are viewport-wide.
Report real horizontal overflow separately: after scrollTo(1e6, 0), if scrollX > 0 the user can scroll sideways, so flag "page scrolls horizontally by N px" on that side. That catches the case the full-width shot was showing, without the misleading picture.
Activity