Skip to content

Commit

Permalink
fix Slate update on filesystem change
Browse files Browse the repository at this point in the history
  • Loading branch information
jaked committed Oct 19, 2021
1 parent 788bdc5 commit b12f273
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/RichTextEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ const RichTextEditor = (props: RichTextEditorProps) => {
[props.moduleName, setTarget, setMatch, setIndex]
);

// TODO(jaked) fix up cursor position if it's no longer valid
editor.children = props.value.children;

const focused = Signal.useSignal(Focus.editorFocused);
React.useEffect(() => {
if (focused) {
Expand Down

0 comments on commit b12f273

Please sign in to comment.