Skip to content

Commit

Permalink
fix: element screenshot issue in headful mode (#8018)
Browse files Browse the repository at this point in the history
Fixes: #7999
  • Loading branch information
OrKoN committed Feb 15, 2022
1 parent 98dabc5 commit 5346e70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/JSHandle.ts
Expand Up @@ -959,7 +959,7 @@ export class ElementHandle<
const layoutMetrics = await this._client.send('Page.getLayoutMetrics');
// Fallback to `layoutViewport` in case of using Firefox.
const { pageX, pageY } =
layoutMetrics.cssLayoutViewport || layoutMetrics.layoutViewport;
layoutMetrics.cssVisualViewport || layoutMetrics.layoutViewport;

const clip = Object.assign({}, boundingBox);
clip.x += pageX;
Expand Down

0 comments on commit 5346e70

Please sign in to comment.