diff --git a/remote/cdp/domains/parent/Emulation.sys.mjs b/remote/cdp/domains/parent/Emulation.sys.mjs index 21aaf2f96501..e9a4e37e23d6 100644 --- a/remote/cdp/domains/parent/Emulation.sys.mjs +++ b/remote/cdp/domains/parent/Emulation.sys.mjs @@ -85,6 +85,10 @@ export class Emulation extends Domain { browser.style.setProperty("min-height", targetHeight + "px"); browser.style.setProperty("max-height", targetHeight + "px"); + browser.ownerDocument.synchronouslyUpdateRemoteBrowserDimensions( + /* aIncludeInactive = */ true + ); + // Wait until the viewport has been resized await this.executeInChild("_awaitViewportDimensions", { width: targetWidth,