From c028a03061e1039be71c5f298195d8e6a1742774 Mon Sep 17 00:00:00 2001 From: Jonah Iden Date: Mon, 11 Nov 2024 17:00:36 +0100 Subject: [PATCH] fixed overlapping of outputs when creating a cell at the top (#14417) Signed-off-by: Jonah Iden --- .../main/browser/notebooks/renderers/output-webview-internal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-ext/src/main/browser/notebooks/renderers/output-webview-internal.ts b/packages/plugin-ext/src/main/browser/notebooks/renderers/output-webview-internal.ts index c52a416b046b6..16efe9ab2ef69 100644 --- a/packages/plugin-ext/src/main/browser/notebooks/renderers/output-webview-internal.ts +++ b/packages/plugin-ext/src/main/browser/notebooks/renderers/output-webview-internal.ts @@ -159,7 +159,7 @@ export async function outputWebviewPreload(ctx: PreloadContext): Promise { theia.postMessage({ type: 'cellFocusChanged', cellHandle: cellHandle }); }); - if (cellIndex && cellIndex < container.children.length) { + if (cellIndex !== undefined && cellIndex < container.children.length) { container.insertBefore(this.element, container.children[cellIndex]); } else { container.appendChild(this.element);