Skip to content

Commit

Permalink
fix(editor): regressive issues fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
thesophiaxu committed Feb 18, 2022
1 parent 0498d89 commit d0ecd6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ export const useNoteEditor: (...args: any) => [any, (text: string) => void, () =
selectUid(componentId, false);
callbacks['focus-last-dfs-node'](dataRef.current, editorContext, true, caret);
}
} else if ((newCaret || 0) >= (getCurrentText().trim()?.length || 0)) {
} else if (newCaret === 0) {
callbacks['focus-last-dfs-node'](dataRef.current, editorContext, true, caret);
}
setTimeout(() => {
Expand Down
2 changes: 2 additions & 0 deletions packages/unigraph-dev-explorer/src/examples/notes/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,8 @@ export const replaceChildWithUid = async (data: any, context: NoteEditorContext,
parentUid = el._value.uid;
child = el._value._value;
const newel = {
_index: { uid: el._index.uid },
_key: el._key,
_value: {
// subentity
uid: el._value.uid,
Expand Down

0 comments on commit d0ecd6d

Please sign in to comment.