-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not remove previous block on backspace #530
Conversation
I think it'd be good to have @jasmussen thoughts on this. |
Let's unpack this. Keeping in mind we want to compare the single paragraph vs. multi paragraph text blocks (#513), we might want different things here. For a multi paragraph text block we might want to enforce the cross-block boundaries more, whereas in a single paragraph text block world we might enforce them only for non-text blocks. In both cases I do agree, we probably don't want you to be able to backspace from the beginning of a text block into an image block and delete it. We do know that we want it to be easy to delete blocks like an image intentionally. So far I've imagined selecting the image and pressing backspace or delete. Either that's enough or we also want an explicit delete button (#130). Depending on where 513 takes us (i.e. after we decide), would it be possible to revisit this? If we go with a single paragraph text block, for instance, we'll probably want to let backspace merge paragraphs and such. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is easy to change one way or another, feel free to merge this 👍
Related #542 |
I'm totally fine with this sort of thing, I just think it should be an explicit opt-in per block, and only for the cases that we've specifically tested and know we can handle. |
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.