diff --git a/awx/ui_next/src/components/CodeEditor/CodeEditor.jsx b/awx/ui_next/src/components/CodeEditor/CodeEditor.jsx
index fac99894f4..501ece5bdb 100644
--- a/awx/ui_next/src/components/CodeEditor/CodeEditor.jsx
+++ b/awx/ui_next/src/components/CodeEditor/CodeEditor.jsx
@@ -96,11 +96,15 @@ function CodeEditor({
useEffect(
function removeTextareaTabIndex() {
const editorInput = editor.current.refEditor?.querySelector('textarea');
- if (editorInput && !readOnly) {
+ if (!editorInput) {
+ return;
+ }
+ if (!readOnly) {
editorInput.tabIndex = -1;
}
+ editorInput.id = id;
},
- [readOnly]
+ [readOnly, id]
);
const listen = useCallback(event => {
@@ -144,7 +148,7 @@ function CodeEditor({
value={value}
onFocus={onFocus}
onBlur={onBlur}
- name={id || 'code-editor'}
+ name={`${id}-editor` || 'code-editor'}
editorProps={{ $blockScrolling: true }}
fontSize={16}
width="100%"
diff --git a/awx/ui_next/src/components/CodeEditor/VariablesField.jsx b/awx/ui_next/src/components/CodeEditor/VariablesField.jsx
index ed56f5376c..dba241e428 100644
--- a/awx/ui_next/src/components/CodeEditor/VariablesField.jsx
+++ b/awx/ui_next/src/components/CodeEditor/VariablesField.jsx
@@ -167,7 +167,7 @@ function VariablesFieldInternals({
- {tooltip && }
+ {tooltip && }