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

Possible to create infinite empty paragraph blocks at end of editor #56401

Open
mrwweb opened this issue Nov 21, 2023 · 4 comments
Open

Possible to create infinite empty paragraph blocks at end of editor #56401

mrwweb opened this issue Nov 21, 2023 · 4 comments
Labels
[Block] Paragraph Affects the Paragraph Block [Type] Bug An existing feature does not function as intended

Comments

@mrwweb
Copy link

mrwweb commented Nov 21, 2023

Description

As of WordPress 6.4, it seems that one can continually create new empty paragraph blocks at the end of the post by clicking below the last paragraph.

Step-by-step reproduction instructions

  1. Make a new post
  2. Place cursor in the last empty paragraph block
  3. Click below the block
  4. A new paragraph block with no placeholder text appears
  5. Repeat Steps 2-4 forever

Screenshots, screen recording, code snippet

This video demonstrates the step-by-step reproduction:

WordPress.6.4.paragraph.bug.mp4

Environment info

  • WordPress 6.4
  • Multiple custom themes tested with same result
  • Observed in Windows Firefox and MacOS Chrome

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

No

@mrwweb mrwweb added the [Type] Bug An existing feature does not function as intended label Nov 21, 2023
@jordesign jordesign added the [Block] Paragraph Affects the Paragraph Block label Nov 21, 2023
@annezazu
Copy link
Contributor

@jasmussen this might be related to your PR that removed the placeholder. Can you speak to this at all?!

@jasmussen
Copy link
Contributor

I don't know that I'd call this a bug, since it's arguably how editors should work, with Enter creating linebreaks. This wouldn't be substantially different by repeating the "Type /" prompt down the page. My personal opinion is that this is working as intended, but I can see how a bunch of empty paragraphs at the end, which show up only in the list view, could be perceived as bad markup. How would you feel about a "linting" type interface, perhaps one that shows up in the pre-publish flow? Such an interface has already been discussed in terms of links that link to #, or buttons that link nowhere.

@mrwweb
Copy link
Author

mrwweb commented Nov 28, 2023

tl;dr - The bug report is specifically about empty paragraphs unexpectedly generated by clicking in empty space. There were additional parts of the experience that made it feel even more like a bug.

@jasmussen I think the title of my bug report is poorly worded in retrospect and didn't really capture what I was trying to communicate. I'll try again!

  1. The primary issue is that clicking in the empty space below the final paragraph creates a new paragraph. There's nothing to indicate an interaction is possible there, and I think the first time it happened was because I was trying to click the last paragraph and missed. At a minimum, it really feels like a bug.
  2. The fact that the first instance of the empty paragraph and the subsequent ones don't also feels broken, even if it's intentional. I can understand the rationale, but it felt weird since I know there's no difference between them under the hood. And not having the placeholder makes clicking into any paragraph without it harder.

"since it's arguably how editors should work, with Enter creating linebreaks."

  1. I hear that, and I spent a while thinking about it before responding. First, I would say that if you want to keep that behavior, the clicking-in-empty-space-makes-empty-paragraphs thing (point 1 above, shown in video) is not standard behavior and still feels like a bug. Beyond that, I'm not convinced it's a good idea at all. The impact of empty paragraphs in a word processor is empty space. That's often not the case in HTML. At least in my experience, allowing lots of empty paragraphs is one of the easiest ways to make the editor design not look like the front-end design.
@jasmussen
Copy link
Contributor

jasmussen commented Nov 29, 2023

The bug report is specifically about empty paragraphs unexpectedly generated by clicking in empty space. There were additional parts of the experience that made it feel even more like a bug.

Apologies. I've had some busy days, thank you for clarifying. Agreed, that isn't helpful. Consecutive presses of Enter feels intentional, but just clicking (with the mouse, below the content) does not seem like an editorial action. 👍 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Paragraph Affects the Paragraph Block [Type] Bug An existing feature does not function as intended
4 participants