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

[4.1-RC2] BUG: Background color breaks mid-paragraph using nbsp #10954

Closed
GlennMartin1 opened this issue Oct 23, 2018 · 4 comments
Closed

[4.1-RC2] BUG: Background color breaks mid-paragraph using nbsp #10954

GlennMartin1 opened this issue Oct 23, 2018 · 4 comments
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended

Comments

@GlennMartin1
Copy link

Describe the bug
In 4.1-RC2, the background color breaks mid-paragraph when using nbsp.

To Reproduce
Create two paragraphs in one block with a non-breaking space between.
Choose a background color.
Save. Note that on front-end, only first section has background color.

Expected behavior
Non-breaking spaces should not break the background formatting.

Screenshots
BACK-END:
image

Front-end In 4.0.0:
image

Front-end in 4.1-RC-2
image

@designsimply designsimply added [Type] Bug An existing feature does not function as intended [Feature] Blocks Overall functionality of blocks labels Oct 23, 2018
@brentswisher
Copy link
Contributor

Looked into this a little bit, it is a bigger issue than just background color. If a paragraph block has two consecutive line breaks (Shift+Enter):

  • In the editor, it remains one paragraph block
  • On the front end, it splits into two paragraphs.

Editor Source:
devtools_-localhost_8888_wp-admin_post_php_post_5_action_edit_and_edit_post gutenberg_dev _wordpress

Front End Source:
devtools_-localhost_8888__p_5_and_background_test _gutenberg_dev

When this split occurs, the second paragraph does not receive the classes or styles of the original block, so no styling is applied, this includes background, color, alignment, font-size etc. One line break doesn't cause any issues.

@desrosj desrosj added this to the WordPress 5.0 milestone Oct 25, 2018
@desrosj
Copy link
Contributor

desrosj commented Oct 25, 2018

I am able to reproduce this in the 5.0 Beta 1 release with the Gutenberg plugin inactive.

@antpb
Copy link
Contributor

antpb commented Oct 25, 2018

@youknowriad is this another one that will be solved with #11050 ? seems similar

@GlennMartin1
Copy link
Author

Yes! 4.1.1 fixed this. Thanks all.

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 [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

5 participants