diff --git a/src/common/components/InlineTextarea.tsx b/src/common/components/InlineTextarea.tsx
index 8e70d084e..d18b8e89d 100644
--- a/src/common/components/InlineTextarea.tsx
+++ b/src/common/components/InlineTextarea.tsx
@@ -17,6 +17,7 @@ export function InlineTextarea(props: {
centerText?: boolean,
minRows?: number,
syncWithInitialText?: boolean, // optional. if set, the text will be reset to initialText when the prop changes
+ selectAllOnFocus?: boolean, // optional. if set to false, text won't be selected on focus (default: true)
onEdit: (text: string) => void,
onCancel?: () => void,
sx?: SxProps,
@@ -72,6 +73,11 @@ export function InlineTextarea(props: {
...(props.centerText && {
sx: { textAlign: 'center' },
}),
+ onFocus: (props.selectAllOnFocus === false) ? undefined : (e) => {
+ // Select all text when the textarea receives focus
+ // This is a great default behavior for all the inline text edits
+ e.target?.select();
+ },
},
}}
sx={props.sx}
diff --git a/src/modules/aifn/flatten/FlattenerModal.tsx b/src/modules/aifn/flatten/FlattenerModal.tsx
index 14f9744dd..0081d8ee1 100644
--- a/src/modules/aifn/flatten/FlattenerModal.tsx
+++ b/src/modules/aifn/flatten/FlattenerModal.tsx
@@ -208,7 +208,7 @@ export function FlattenerModal(props: {
)}
{/* Review or Edit Text */}
- {isSuccess && }
+ {isSuccess && }
}
diff --git a/src/modules/beam/gather/FusionInstructionsEditor.tsx b/src/modules/beam/gather/FusionInstructionsEditor.tsx
index ddacd6cff..4fda3eff7 100644
--- a/src/modules/beam/gather/FusionInstructionsEditor.tsx
+++ b/src/modules/beam/gather/FusionInstructionsEditor.tsx
@@ -51,6 +51,7 @@ function EditableChatInstructionPrompt(props: {
decolor
initialText={props.itemValue}
minRows={3}
+ selectAllOnFocus={false}
onCancel={handleEditCancel}
onEdit={handleEdit}
sx={{