From 6388718b870d011e07931326fe87492fc7e51b59 Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Sat, 6 Jun 2026 00:35:57 -0400 Subject: [PATCH] fix: Forge iframe fills full modal height (position:absolute) .editor-body has flex height, so percentage height on iframe didn't work. Changed to position:absolute;inset:0 which fills the relative parent regardless of flex sizing. --- frontend/app.js | 2 +- frontend/js/viewer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/app.js b/frontend/app.js index 5b7bf30..74fa0a4 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -3302,7 +3302,7 @@ var iframe = document.createElement("iframe"); iframe.id = "forge-iframe"; iframe.src = "/editor-poc?vault=" + encodeURIComponent(data.vault) + "&path=" + encodeURIComponent(data.path); - iframe.style.cssText = "width:100%;height:100%;border:none;"; + iframe.style.cssText = "position:absolute;top:0;left:0;width:100%;height:100%;border:none;"; bodyEl.appendChild(iframe); modal.classList.add("active"); safeCreateIcons(); diff --git a/frontend/js/viewer.js b/frontend/js/viewer.js index dbbc30f..5c906b1 100644 --- a/frontend/js/viewer.js +++ b/frontend/js/viewer.js @@ -507,7 +507,7 @@ export function renderFile(data) { var iframe = document.createElement("iframe"); iframe.id = "forge-iframe"; iframe.src = "/editor-poc?vault=" + encodeURIComponent(data.vault) + "&path=" + encodeURIComponent(data.path); - iframe.style.cssText = "width:100%;height:100%;border:none;"; + iframe.style.cssText = "position:absolute;top:0;left:0;width:100%;height:100%;border:none;"; bodyEl.appendChild(iframe); modal.classList.add("active"); safeCreateIcons();