Skip to content

Commit

Permalink
fix: element screenshot issue in headful mode
Browse files Browse the repository at this point in the history
Fixes: #7999
  • Loading branch information
OrKoN committed Feb 15, 2022
1 parent 7282fdd commit d8a1ade
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 d8a1ade

Please sign in to comment.