Open pendantry opened 3 years ago
This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.
I regret closing this issue. The issue may be 'stale', but it's still a valid bug report that should, at some point, be addressed.
Here's a blog post I wrote that illustrates the problem (and reveals more block editor bugginess, too): https://pendantry.wordpress.com/2021/05/15/defeating-the-list-block-walloftext-problem-using-css/
Similar issue report on WP Forum, where classes are being removed from the list. Reference: https://wordpress.org/support/topic/bug-gutenberg-editor-deletes-classes-of-elements/
I have tested and can reproduce the issue with the plugin. WP Block editor doesn't have this problem but Gutenberg has.
Steps to reproduce the behavior
Add a list block
Enter text
Select 'Edit as HTML' from 'More options'
Replace all occurrences of '<li>' with '<li style="margin-bottom: 10px;">'
Select 'Edit visually' from 'More options'
Note that the display does not render the white space that should be inserted by the inline CSS (this is another bug!)
Preview in new tab. Note that the output does render the expected white space after each list item when previewed:
Switch between 'Edit as HTML' and 'Edit visually' as many times as you care to. Note that the inline CSS is retained.
Make a single change to the text in the list while in 'Edit visually' mode
Switch to 'Edit as HTML' and note that the inline CSS has disappeared
What I expected to happen
I expected the inline CSS I added in 'Edit as HTML' mode to be retained even after amending the text in the list
What actually happened
The inline CSS was stripped out when making a change to the text in the list
Context
Browser / OS version
Firefox version 85.0.2 (64-bit) on Windows 8.1 and Google Chrome Version 88.0.4324.150 (Official Build) (64-bit) on Windows 8.1
Is this specific to the applied theme? Which one?
Tested on Twenty-Ten and Colinear themes -- both behave in exactly the same way
Does this happen on simple or atomic sites or both?
I have no idea what constitutes a 'simple' or an 'atomic' site
Is there any console output or error text?
No
Level of impact (Does it block purchases? Does it affect more than just one site?)
Tested on both pendantry.wordpress.com and oldpompeiians.wordpress.com
Screenshot / Video: If applicable, add screenshots to help explain your problem.
Screen clips included above