Skip to content

Commit 93fdaaa

Browse files
efemaerclaude
andcommitted
fix(web): Backspace after a list shortcut restores the typed marker
The list item's Backspace handler replaces Tiptap's default, which runs undoInputRule first. Without that step, Backspace lifts the new item out of its list and drops the marker the user typed. Run undoInputRule first, as the default does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent cd73336 commit 93fdaaa

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎apps/web/src/composer-rich-text-doc.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,7 @@ function listItemTypeAt($pos: ResolvedPos): "listItem" | "taskItem" | null {
12921292
* without touching their indent or marker, so the composer turns it off.
12931293
*/
12941294
function backspaceAcrossList(editor: Editor): boolean {
1295+
if (editor.commands.undoInputRule()) return true;
12951296
const { state } = editor;
12961297
const { $from, empty } = state.selection;
12971298
if (!empty || $from.parentOffset !== 0) return false;

0 commit comments

Comments
 (0)