fix: Forge iframe height uses 82vh (bypasses flex parent issue)
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:
+1
-1
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user