Commit e835cafc authored by Paul Kaplan's avatar Paul Kaplan

fix(studio): limit the max length of studio titles on the client side

parent 4efbf000
......@@ -23,6 +23,8 @@ const errorToMessageId = error => {
}
};
const TITLE_MAX_LENGTH = 52;
const StudioTitle = ({
titleError, isFetching, isMutating, isMutedEditor, title, canEditInfo, handleUpdate
}) => {
......@@ -52,6 +54,7 @@ const StudioTitle = ({
className={classNames('inplace-textarea', fieldClassName)}
disabled={isMutating || !canEditInfo || isFetching}
defaultValue={title}
maxLength={TITLE_MAX_LENGTH}
onKeyDown={e => e.key === 'Enter' && e.target.blur()}
onBlur={e => {
if (e.target.value !== title) handleUpdate(e.target.value);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment