Repository navigation
Delete backward when the current line range is empty - #6203
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 31f6310 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Merged
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.
Deleting backward by line did nothing when the computed line range was collapsed. Delegate that case to character deletion so empty paragraphs and block starts merge with preceding content.
Fixes #4263
The tests dispatch deleteSoftLineBackward directly, avoiding platform-specific keyboard mappings. Both block-start regressions fail on main 8f59fd3 in Chromium, Firefox and WebKit. WebKit's physical Cmd+Backspace normally sends deleteHardLineBackward and does not use this changed path.
Validation: 48 focused checks passed (eight scenarios, three desktop browsers, twice); 16 synthetic-mobile checks skipped. Includes lists, tables, a preceding void, and a soft-wrapped line. check.sh passed on Node 24.21.0: 1,468 Mocha / 141 Jest tests, build, TypeScript, ESLint and Prettier. Playwright TypeScript and formatting pass, including the added wrapped-line test.
Android uses the same deleteBackward path, but a physical soft-keyboard check remains pending. A slate-dom patch changeset is included. Forward deletion and block-unit deletion are unchanged.
Full browser suite: 284 passed / 25 skipped / 3 failures. The Chromium Markdown list failure reproduces on main (2 of 12 repeated Markdown tests failed). Mobile mentions suggestions and paste-code setup also failed once; both pass twice on the fix and four times on main. Those two intermittent failures were not reproduced on main. Their existing setup uses DOM selectText plus plain Backspace; it does not intentionally exercise line deletion. The paste failure left the initial two code elements present. The new 24 desktop checks all pass in the full run. This is not an entirely green browser run. The markdown-shortcuts failure is a test-timing flake (a click processed after the keys that follow it), fixed separately in #6205.