Skip to content

Commit

Permalink
Set minHeight for markdown iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Tideman committed Nov 27, 2024
1 parent 7f570dd commit e26732c
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 e26732c

Please sign in to comment.