Switching back to Defaul Block Style not possible
Describe the bug Since Version 8.3.0 it's not possible to remove a selected Block Style, unless removing the additional css class by hand.
To reproduce Steps to reproduce the behavior:
- Add the Quote Block
- Select a block style
- try to remove it
Expected behavior like in version 8.2.1 or by clicking again on the block style selector (would be nice)
Screenshots If applicable, add screenshots to help explain your problem.
Editor version (please complete the following information):
- WordPress version: 5.4.2
- Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? installed
- If the Gutenberg plugin is installed, which version is it? 8.3.0
On my initial tests, I don't reproduce but maybe there's something I'm missing here. @adamziel Any idea here whether it could be related to the default class removal or the refactorings that happened?
Do you mean that clicking an already active block style does not toggle it off?
Maybe it's because of my custom theme.. can't reproduce it with the twenty twenty theme either.
@silvanarnet Thank you for reporting! The default style is one of the styles listed in the block inspector:
To "remove" a style and restore the default one, you simply have to select the style marked as default - it's meant to remove any style-related classes from the block.
I am not sure how to reproduce the issue - do you mean what @oxyc asked? Or do you mean switching back to the default style does not remove the CSS class? Would you mind posting a screen capture gif showing the exact process you're following?
@adamziel https://jmp.sh/X3DC8Cz
Ah gotcha! It sounds like the same issue as https://github.com/WordPress/gutenberg/issues/24147 - the good news is that it was just fixed a few days ago.