Cursor should remain at the start and title should remain editable (#5199)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user