From 024abc9b4f11017a47bbcfe4fcedeec2cbd4acad Mon Sep 17 00:00:00 2001 From: Gal Podlipnik Date: Wed, 7 Oct 2026 12:11:27 +0200 Subject: [PATCH] fix(meerkat-dbm) Change iframe manager from absolut to fixed --- .../src/dbm/dbm-parallel/iframe-manager.ts | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/meerkat-dbm/src/dbm/dbm-parallel/iframe-manager.ts b/meerkat-dbm/src/dbm/dbm-parallel/iframe-manager.ts index b877fe6a..cc04c865 100644 --- a/meerkat-dbm/src/dbm/dbm-parallel/iframe-manager.ts +++ b/meerkat-dbm/src/dbm/dbm-parallel/iframe-manager.ts @@ -14,7 +14,7 @@ interface IFrameManagerConstructor { uuid: string; onMessage: ( runnerId: string, - message: WindowMessage + message: WindowMessage, ) => any; } @@ -33,13 +33,20 @@ export class IFrameManager { this.iframe = document.createElement('iframe'); this.iframe.src = `${runnerURL}?uuid=` + uuid + '&origin=' + origin; const runnerDomain = new URL(runnerURL).origin; - document.body.appendChild(this.iframe); - //Move the iframe out of the screen - this.iframe.style.position = 'absolute'; - this.iframe.style.left = '-10000px'; - this.iframe.style.top = '0'; - this.iframe.style.visibility = 'hidden'; + // Hidden worker host, kept as a zero-size fixed box inside the viewport + Object.assign(this.iframe.style, { + position: 'fixed', + top: '0', + left: '0', + width: '0', + height: '0', + border: '0', + visibility: 'hidden', + pointerEvents: 'none', + }); + + document.body.appendChild(this.iframe); this.communication = new WindowCommunication({ targetWindow: this.iframe.contentWindow as Window,