Skip to content

Commit

Permalink
fix: backspace on empty line doesn’t return to previous list item
Browse files Browse the repository at this point in the history
  • Loading branch information
LIlGG committed Aug 7, 2024
1 parent 4a4f8b6 commit 209cffd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/packages/editor/src/extensions/paragraph/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export function deleteCurrentNodeAndSetSelection(
const { tr } = state;
if (deleteNodeByPos($from)(tr) && dispatch) {
if (beforePos !== 0) {
tr.setSelection(TextSelection.create(tr.doc, beforePos - 1));
tr.setSelection(TextSelection.near(tr.doc.resolve(beforePos - 1), -1));
}
dispatch(tr);
return true;
Expand Down

0 comments on commit 209cffd

Please sign in to comment.