From 0b57522dce50ded95dbdfc00b552dd43c3c288da Mon Sep 17 00:00:00 2001 From: "Keith J. Grant" Date: Tue, 9 Mar 2021 11:27:43 -0800 Subject: [PATCH] CodeEditor: don't type newline when pressing enter to start edit mode --- awx/ui_next/src/components/CodeEditor/CodeEditor.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/ui_next/src/components/CodeEditor/CodeEditor.jsx b/awx/ui_next/src/components/CodeEditor/CodeEditor.jsx index 9ac4fb5331..e32a370475 100644 --- a/awx/ui_next/src/components/CodeEditor/CodeEditor.jsx +++ b/awx/ui_next/src/components/CodeEditor/CodeEditor.jsx @@ -90,8 +90,9 @@ function CodeEditor({ if (!editorInput) { return; } - editorInput.focus(); + event.preventDefault(); event.stopPropagation(); + editorInput.focus(); } }, []);