Do not remove previous block on backspace #530
Merged
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.
This quick PR is a follow-up to discussion at https://github.com/WordPress/gutenberg/pull/461/files#r112692639. When testing out the Backspace-to-merge behavior introduced there, I was pretty surprised to learn that pressing Backspace at the beginning of a text block will delete the previous block in a lot of cases (an image/gallery block, for example).
I think it's pretty unlikely that this would be the intended result of such an operation. In general it should be much more difficult to delete blocks, and it should require an explicit action from the user (I don't think the controls for this exist yet).
Let's go back to the other alternative discussed in that comment thread (do nothing) until we provide a better way to remove blocks.