Skip to content

Commit

Permalink
Set minHeight for markdown iframe (#2445)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Tideman authored Nov 27, 2024
1 parent 7f570dd commit b3c8d94
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/holocene/monaco/markdown.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
const resizeIframe = () => {
if (!iframe) return;
const minHeight = 100;
const height = Math.max(
iframe.contentWindow.document.body.scrollHeight + 2,
minHeight,
);
iframe.height = '';
iframe.height = iframe.contentWindow.document.body.scrollHeight + 2 + 'px';
iframe.height = height + 'px';
};
const { workflow: workflowId, run: runId, namespace } = $page.params;
Expand Down

0 comments on commit b3c8d94

Please sign in to comment.