fix: Forge iframe height uses 82vh (bypasses flex parent issue)
CI / lint (push) Successful in 14s
CI / security (push) Successful in 8s
CI / test (push) Successful in 24s
CI / build (push) Successful in 2s

height:100% doesn't work when parent uses flex height. position:absolute collapses the parent. 82vh = 90vh modal - header. Also set bodyEl overflow:hidden.
This commit is contained in:
2026-06-06 00:40:35 -04:00
parent 6388718b87
commit 3090fe62fe
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -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 = "position:absolute;top:0;left:0;width:100%;height:100%;border:none;";
iframe.style.cssText = "width:100%;height:82vh;border:none;display:block;";
bodyEl.appendChild(iframe);
modal.classList.add("active");
safeCreateIcons();
+2 -1
View File
@@ -504,10 +504,11 @@ export function renderFile(data) {
var bodyEl = document.getElementById("editor-body");
titleEl.textContent = "Forge: " + data.path.split("/").pop();
bodyEl.innerHTML = "";
bodyEl.style.overflow = "hidden";
var iframe = document.createElement("iframe");
iframe.id = "forge-iframe";
iframe.src = "/editor-poc?vault=" + encodeURIComponent(data.vault) + "&path=" + encodeURIComponent(data.path);
iframe.style.cssText = "position:absolute;top:0;left:0;width:100%;height:100%;border:none;";
iframe.style.cssText = "width:100%;height:82vh;border:none;display:block;";
bodyEl.appendChild(iframe);
modal.classList.add("active");
safeCreateIcons();