diff --git a/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx b/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx index ac1ec9ee242..9649e042810 100644 --- a/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx +++ b/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx @@ -596,7 +596,8 @@ export const CodeEditor = ({ )} ref={ref} > - {(isUploadEnabled || emptyState) && !value ? ( + {isUploadEnabled || emptyState ? ( + /* Upload/EmptyState enabled: wrap in Dropzone container */
event.stopPropagation() // Prevents clicking TextArea from opening file dialog @@ -619,7 +620,8 @@ export const CodeEditor = ({
) : ( - <> + /* No upload/emptyState: use consistent container structure */ +
{editorHeader} {showEditor && (
@@ -627,7 +629,7 @@ export const CodeEditor = ({ {editor}
)} - +
)} );