Repository navigation
Conversation
A block cursor is rendered whenever the selection is an element point next to a node that $needsBlockCursorBeside — a block DecoratorNode, or a non-inline shadow root such as a table or a slot-bearing card. There is no text position at that spot, so Backspace/Delete can only mean "remove that node". deleteCharacter only did that for a decorator. For an ElementNode the caret walk descended into it as a ChildCaret and hit the "don't merge with a shadow root block" guard, which returns without deleting anything unless the anchor is an empty block — so a block cursor between two cards did nothing at all. Remove the adjacent node when the collapsed anchor is an element point beside a block-cursor ElementNode. Decorators keep going through the existing branch, which also honours isIsolated(). Fixes meta#8939
LeSingh1
requested review from
acywatson,
etrepum,
fantactuka,
ivailop7,
potatowagon and
zurfyx
as code owners
August 7, 2026 09:08
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
A block cursor is rendered whenever the selection is an element point next to a node that
$needsBlockCursorBeside— a blockDecoratorNode, or a non-inline shadow root such as a table or a slot-bearing card. There is no text position at that spot, so Backspace/Delete can only mean "remove that node".deleteCharacteronly did that for a decorator. For anElementNodethe caret walk descends into it as aChildCaretand hits the "don't merge with a shadow root block" guard, which returns without deleting anything unless the anchor is an empty block — so a block cursor between two cards did nothing at all, in either direction.This removes the adjacent node when the collapsed anchor is an element point beside a block-cursor
ElementNode. Decorators keep going through the existing branch, which also honoursisIsolated().Tests cover both directions against a decorator and a shadow root side by side (the decorator cases pin the behaviour that already worked), backspace after the last shadow root, and the two boundaries: an empty block next to a shadow root still removes the block, and a plain paragraph still merges.
Fixes #8939