Skip to content
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

Unable to delete empty paragraph block #6579

Closed
grappler opened this issue May 4, 2018 · 10 comments
Closed

Unable to delete empty paragraph block #6579

grappler opened this issue May 4, 2018 · 10 comments
Assignees
Labels
[Feature] Blocks Overall functionality of blocks Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Enhancement A suggestion for improvement.
Milestone

Comments

@grappler
Copy link
Member

grappler commented May 4, 2018

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.

@ocean90
Copy link
Member

ocean90 commented May 4, 2018

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

@gziolo
Copy link
Member

gziolo commented May 4, 2018

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

@jasmussen
Copy link
Contributor

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.

@grappler
Copy link
Member Author

grappler commented May 4, 2018

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.

@karmatosed
Copy link
Member

karmatosed commented May 4, 2018

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.

@gziolo gziolo added [Type] Enhancement A suggestion for improvement. [Feature] Blocks Overall functionality of blocks Good First Issue An issue that's suitable for someone looking to contribute for the first time labels May 4, 2018
@tofumatt tofumatt self-assigned this May 4, 2018
@tofumatt tofumatt added this to the 2.9 milestone May 4, 2018
@ZebulanStanphill
Copy link
Member

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.

@antonioguedes
Copy link

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!

@dkvadratu
Copy link

dkvadratu commented Apr 1, 2020

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

@alejandro-moreno-mvd
Copy link

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

@kubiqsk
Copy link

kubiqsk commented Apr 23, 2024

This problem is again in the newest WP 6.5.2
Empty paragraph can not be removed by Delete or Backspace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests