-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Preformatted blocks are losing whitespace. #6917
Comments
Hi @diegoreymendez, Thanks for the detailed report! I can't reproduce this issue in Safari Version 11.1 (13605.1.33.1.4) on master or in Gutenberg v2.9.2: Are you running any plugins that might impact what's being saved? Can you debug further to see if you can track down any more details? |
Can you try disabling Jetpack and seeing if he problem reproduces with Jetpack disabled? |
@diegoreymendez Were you able to track this down? |
@danielbachhuber - I'm getting the same issue with Jetpack disabled. It's not properly rendering whitespace when following the steps from my GIF above. |
@diegoreymendez Odd. Could it be a browser extension? |
@danielbachhuber - This is what I see without WP Plugins (other than Gutenberg), and without Safari extensions (the only one I had was 1Password, and I disabled it for this). I noticed you tested this doing some form of page reload... can you try switching to HTML mode and back to see if you can reproduce the same behavior? |
Yes, I can reproduce your bug report now. Thanks for diligently tracking down reproduction steps. |
I've found what I think is the same thing. It occurs when duplicating blocks and when saving a post and re-loading. This is:
Video: https://cl.ly/2C0d2w2W291P Looks like you've managed to replicate but do you want me to try and make this happen in a simpler setup? |
@rosswintle I think this part of your video describes the reproduction steps well: Notably:
I wasn't able to reproduce the aforementioned steps with the paragraph block, so it seems specific to the pre-formatted block. I don't know the transformation code well enough to know how to debug this yet though. @iseulde @jorgefilipecosta @aduth Any tips for debugging? |
I expect this is likely related to / duplicate of #4456 , caused by block serializer's beautification removing excess whitespace. Though I might have thought
It could be that TinyMCE is inserting whitespace as |
Some good examples in #7836 |
This is fixed by #7892 |
Describe the bug
Preformatted blocks are not really working as expected. They're losing whitespace when converting from visual to HTML and back.
Gutenberg v2.9.2
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The whitespace should be maintained.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: