Gutenberg: Unable to delete empty paragraph block

Created on 4 May 2018  路  9Comments  路  Source: WordPress/gutenberg

Issue Overview

Unable to delete empty paragraph block. I was copying content from Word/Pages and pasting it as "Paste and Match Style". This was creating empty paragraphs. This would not be a problem if I could delete the empty blocks.

Steps to Reproduce (for bugs)

  1. Add the following to via the via the "Code Editor" between other blocks
<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->
  1. Try to delete the block using the mouse 馃崁
  2. Type somthing
  3. Now try to delete the block.

Chrome and Gutenberg 2.8

Expected Behavior

Be able to delete the empty block without having type something in the block first.

Current Behavior

Unable to delete empty paragraph block.

Good First Issue [Feature] Blocks [Type] Enhancement

Most helpful comment

The empty paragraph is the only one that does not have trash icon. I don't think that is consistent UX.

Either we should have the icon everywhere or remove it completely. I could get used to deleting all blocks with the keyboard.

All 9 comments

You should be able to delete the paragraph block by clicking the delete key.

I think we still should provide trash icon for better UX. Or should we just close? /cc @karmatosed @jasmussen

Both delete and backspace work in the situation where you have an empty paragraph. I don't think we need a delete button for that, especially since there are plenty of icons already. But I'll defer to the leads for a call.

The empty paragraph is the only one that does not have trash icon. I don't think that is consistent UX.

Either we should have the icon everywhere or remove it completely. I could get used to deleting all blocks with the keyboard.

I would actually second having the trash icon on it to delete. I say this as myself looking for it the other day. I also think whilst we know keyboard actions many won't or at least won't first few uses.

I also think that the delete/trash button should be added to empty Paragraph blocks. Several times I have found myself quickly deleting a series of blocks using the delete icon on hover, only to get a little confused for a moment when the button is not there for the Paragraph block, which causes me to have to switch to using the keyboard for a moment.

Found out that when you have 2 or more empty columns in one block, if you go to the menu and click on the three lines (hamburger menu) next to the icon "i", select > column > then on the right where you see the number of columns you can create, just delete whatever number is there, and boom! Block is deleted!

WP 5.4 not possible to remove empty paragraph, and it generates empty <p> in front.
image

Found out that when you have 2 or more empty columns in one block, if you go to the menu and click on the three lines (hamburger menu) next to the icon "i", select > column > then on the right where you see the number of columns you can create, just delete whatever number is there, and boom! Block is deleted!

That works on 5.4.1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maddisondesigns picture maddisondesigns  路  3Comments

franz-josef-kaiser picture franz-josef-kaiser  路  3Comments

davidsword picture davidsword  路  3Comments

cr101 picture cr101  路  3Comments

youknowriad picture youknowriad  路  3Comments