Repository navigation
[lexical-list] Chore: Remove redundant decorator-adjacent backspace handler - #8871
Merged
etrepum merged 1 commit intoJul 22, 2026
Merged
Conversation
mayrang
requested review from
acywatson,
etrepum,
fantactuka,
ivailop7,
potatowagon and
zurfyx
as code owners
July 22, 2026 03:08
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
etrepum
approved these changes
Jul 22, 2026
Merged
etrepum
pushed a commit
to etrepum/lexical
that referenced
this pull request
Aug 6, 2026
Conflicts resolved: - formatList.ts: compose upstream's named-slot guard (meta#8905) with this branch's $copySemanticNestingMark — the mark copy now happens inside the slot-host check, alongside the children move it annotates. - registerList.ts: accept upstream's removal of the decorator-adjacent backspace handler (meta#8871); the semantic parking that handler carried lives in ListItemNode.collapseAtStart, which the core deleteCharacter path invokes, and registerListBackspaceDecorator.test.ts still passes. Drop the now-unused $parkNestedListsInWrapper import here. Also align this branch's ARROW_RIGHT registration with upstream's registerCommand generics removal (meta#8877 follow-up, meta#8871 series). Verified: tsc clean; 872 list/markdown/mdast unit tests, 51 browser tests, and 4267 core/react/html/selection/rich-text tests pass. Co-Authored-By: Claude Fable 5 <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
$handleListItemBackspaceAdjacentToDecoratorwas added by PR #8676 (issue #5072) to prevent Backspace at the start of a list item from deleting an adjacent DecoratorNode above it. It converted the first list item into a paragraph instead.Since PR #8829,
ListItemNode.collapseAtStart()handles all first-item Backspace cases — including the decorator-adjacent one — by converting to paragraph. Both paths produce the same tree structure, making the decorator handler dead code.Test plan
pnpm test-unit -- packages/lexical-list— 119 tests pass, 0 regressionsregisterListBackspaceDecorator.test.tspass viacollapseAtStart