docs/solutions/logic-errors/2026-04-14-slate-v2-delete-selection-normalization-must-distinguish-inline-spacers-from-inline-targets.md
delete-text.ts got the content recovery back to green, but the legacy delete
audit stayed red on a handful of caret rows.
The bad pattern was simple: one generic post-delete selection normalizer kept trying to answer every inline-boundary case with the same rule.
That collapsed three different situations into one:
Those patches just moved the failure around:
The fix was to split the post-delete selection rules by shape instead of pretending there was one universal inline rule.
delete-text.ts now does three separate things:
If a delete path has a content-restoration branch, verify it does not define
character boundaries differently from getCharacterDistance.
The surviving selection point is not just “the next inline-looking place”.
Inline delete rows care about whether the current point is:
Those are different contracts. Once the code treats them separately, the package suite and the full legacy transform audit stop fighting each other.
For Slate v2 delete normalization: