Skip to content

Limit whole-block hanging deletion to top-level blocks - #6287

Merged
dylans merged 1 commit into
mainfrom
hanging-delete-top-level
Oct 14, 2026
Merged

dylans merged 1 commit into
mainfrom
hanging-delete-top-level

Conversation

@dylans

@dylans dylans commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

#6282 extended whole-block removal for a hanging selection to nested sibling blocks. Editors that don't mark table cells with editor.isIsolated (every editor written before 0.136) can now lose whole cells when dragging or cutting across them; the table example's Firefox drag test fails on main. The richtext undo-scroll test also fails on main: after undoing a triple-click deletion, the default scroll targets the start of the following block, so the restored paragraph stays off screen.

  • Editor.deleteFragment removes whole blocks only for top-level blocks. Nested blocks keep the pre-0.138 behavior.
  • Triple-click keeps the native selection only for top-level, non-isolated blocks. Nested blocks select their own contents, as before 0.138.
  • Cut and drag go back to the top-level whole-block handling from Move whole lines as blocks when dragging or cutting #6171.
  • defaultScrollSelectionIntoView scrolls to the unhung end of a forward hanging selection.

Verified locally with retries off: richtext, tables, delete-line, triple-click and scroll-selection suites across Chromium, Firefox, mobile Chromium and WebKit, 129 passed and 19 platform skips. Both failures from CI on main pass. Updated core tests cover nested blocks.

Follow-up to #6282

@changeset-bot

changeset-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 78fd5ab

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
slate Patch
slate-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dylans
dylans merged commit b0462a1 into main Oct 14, 2026
16 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant