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

Empty paragraph block renders without opening <p> tag/invalid html #11238

Closed
knutsp opened this issue Oct 30, 2018 · 5 comments
Closed

Empty paragraph block renders without opening <p> tag/invalid html #11238

knutsp opened this issue Oct 30, 2018 · 5 comments
Labels
[Block] Paragraph Affects the Paragraph Block Needs Testing Needs further testing to be confirmed. [Type] Bug An existing feature does not function as intended

Comments

@knutsp
Copy link

knutsp commented Oct 30, 2018

Describe the bug
Empty paragraph block gives a stray

tag

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Add new post'
  2. Add a title and press enter
  3. Write some text as first block + enter
  4. Write some text as second block + enter
  5. Write some text as third block
  6. Place cursor in second block and delete all text by backspace
  7. Publish post
  8. Show post
    9 Show html source in browser
  9. Scroll down to see paragraph-1 text and paragraph-3 text
  10. Observe </p> on a line between paragraphs

Expected behavior
No extra </p>, nothing or empty line

Desktop

  • OS: Windows 10
  • Firefox
  • Version 62

Additional context

  • WordPress 5.0 beta2.
@earnjam
Copy link
Contributor

earnjam commented Oct 30, 2018

I'm not seeing any invalid markup.

Tested using your steps as best I could tell:

image

image

I think we lost some information in your post. Can you update and put the markup you are seeing inside backticks or else use a screenshot?

@earnjam earnjam added the [Status] Needs More Info Follow-up required in order to be actionable. label Oct 30, 2018
@knutsp
Copy link
Author

knutsp commented Oct 31, 2018

This what I get:
11238-gutenberg
11238-html
No plugins except WP Beta Tester and Advanced Automatic Updates

@earnjam
Copy link
Contributor

earnjam commented Oct 31, 2018

Ah, you're right. I see the same thing now in Firefox. I was testing in Chrome before.

Seems to only be Paragraph tags. I tried with other empty text blocks and none of them had invalid markup.

@earnjam earnjam added [Type] Bug An existing feature does not function as intended Browser Issues Issues or PRs that are related to browser specific problems [Block] Paragraph Affects the Paragraph Block and removed [Status] Needs More Info Follow-up required in order to be actionable. labels Oct 31, 2018
@earnjam
Copy link
Contributor

earnjam commented Oct 31, 2018

Actually, now I see it in Chrome too. 🤔

Content is saved correctly in the database.
image

It's just dropping the opening <p> when rendering on the front-end.

@earnjam earnjam removed the Browser Issues Issues or PRs that are related to browser specific problems label Oct 31, 2018
@earnjam earnjam changed the title Empty block causing invalid html Empty paragraph block renders without opening <p> tag/invalid html Oct 31, 2018
@swissspidy swissspidy added the Needs Testing Needs further testing to be confirmed. label Jun 3, 2019
@youknowriad
Copy link
Contributor

I'm not able to reproduce this issue anymore. Thanks

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 Needs Testing Needs further testing to be confirmed. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants