diff --git a/app/components/ContentEditable.tsx b/app/components/ContentEditable.tsx index 7bf75bcba..c0f9dfb2b 100644 --- a/app/components/ContentEditable.tsx +++ b/app/components/ContentEditable.tsx @@ -57,7 +57,13 @@ const ContentEditable = React.forwardRef( React.useImperativeHandle(ref, () => ({ focus: () => { - contentRef.current?.focus(); + if (contentRef.current) { + contentRef.current.focus(); + // looks unnecessary but required because of https://github.com/outline/outline/issues/5198 + if (!contentRef.current.innerText) { + placeCaret(contentRef.current, true); + } + } }, focusAtStart: () => { if (contentRef.current) {