Skip to content

Commit

Permalink
fix: stop calling bringToFront before taking screenshots (#2830)
Browse files Browse the repository at this point in the history
With https://crrev.com/5899683 (M131) it should not be longer needer to
make sure background tabs are brought to front before taking a
screenshot.
  • Loading branch information
OrKoN authored Nov 27, 2024
1 parent a818647 commit 6017898
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/bidiMapper/modules/context/BrowsingContextImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1128,10 +1128,6 @@ export class BrowsingContextImpl {
}
const formatParameters = getImageFormatParameters(params);

// XXX: Focus the original tab after the screenshot is taken.
// This is needed because the screenshot gets blocked until the active tab gets focus.
await this.#cdpTarget.cdpClient.sendCommand('Page.bringToFront');

let captureBeyondViewport = false;
let script: string;
params.origin ??= 'viewport';
Expand Down

0 comments on commit 6017898

Please sign in to comment.