Fix weird focus issue cause by #184

This commit is contained in:
Kurt Hutten
2020-12-31 18:22:58 +11:00
parent 9d6cc60864
commit 4393bd040d

View File

@@ -187,9 +187,13 @@ const PartProfile = ({
{isEditable ? 'Markdown supported' : ''} {isEditable ? 'Markdown supported' : ''}
</div> </div>
<div <div
id="description-wrap"
name="description" name="description"
className="markdown-overrides rounded-lg shadow-md bg-white px-12 py-6 min-h-md" className="markdown-overrides rounded-lg shadow-md bg-white px-12 py-6 min-h-md"
onClick={() => editorRef?.current?.focusAtEnd()} onClick={(e) =>
e?.target?.id === 'description-wrap' &&
editorRef?.current?.focusAtEnd()
}
> >
<Editor <Editor
ref={editorRef} ref={editorRef}