From 700c6c7f3f17734d7efe7784e24ace9bba69e2ec Mon Sep 17 00:00:00 2001 From: Akshay Agrawal Date: Mon, 7 Oct 2024 10:04:23 -0700 Subject: [PATCH] fix: temporarily show code (#2523) focusout bubbles, blur doesn't. --- frontend/src/components/editor/cell/code/cell-editor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/editor/cell/code/cell-editor.tsx b/frontend/src/components/editor/cell/code/cell-editor.tsx index c64d2379445..db0bb695a28 100644 --- a/frontend/src/components/editor/cell/code/cell-editor.tsx +++ b/frontend/src/components/editor/cell/code/cell-editor.tsx @@ -340,7 +340,7 @@ const CellEditorInternal = ({ updateCellConfig({ cellId, config: { hide_code: false } }); editorViewRef.current?.focus(); editorViewParentRef.current?.addEventListener( - "blur", + "focusout", () => updateCellConfig({ cellId, config: { hide_code: true } }), { once: true }, );