gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Switching back to Defaul Block Style not possible

Open silvanarnet opened this issue 6 years ago • 6 comments

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:

  1. Add the Quote Block
  2. Select a block style
  3. 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

silvanarnet avatar Jun 18 '20 08:06 silvanarnet

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?

youknowriad avatar Jun 18 '20 12:06 youknowriad

Do you mean that clicking an already active block style does not toggle it off?

oxyc avatar Jun 19 '20 00:06 oxyc

Maybe it's because of my custom theme.. can't reproduce it with the twenty twenty theme either.

silvanarnet avatar Jun 19 '20 05:06 silvanarnet

@silvanarnet Thank you for reporting! The default style is one of the styles listed in the block inspector:

Zrzut ekranu 2020-06-19 o 11 26 16

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 avatar Jun 19 '20 09:06 adamziel

@adamziel https://jmp.sh/X3DC8Cz

silvanarnet avatar Jul 30 '20 08:07 silvanarnet

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.

adamziel avatar Jul 30 '20 09:07 adamziel