gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Social Icons block removes items-justified-x class when duplicated

Open andersnoren opened this issue 5 years ago • 4 comments

Description

When you duplicate a Social Icons block set to a "Justify X" value other than left, the duplicate loses the justify setting or reverses to the setting the original had when the post was last saved. This also happens if you duplicate a group containing a Social Icons block with a justify setting.

Step-by-step reproduction instructions

  1. Add a Social Icons block
  2. Set it to "Justify right".
  3. Duplicate the block. The duplicate reverts to "Justify left".

To have the duplicate reverse to the value the original had when the post was last updated:

  1. Add a Social Icons block.
  2. Set it to "Justify right".
  3. Update the post and reload.
  4. Set the Social Icons block to "Justify center".
  5. Duplicate the block. The duplicate now reverts to "Justify right" – the value the original had when the post was updated.

Screenshots, screen recording, code snippet

No response

Environment info

Gutenberg 11.4.1, WordPress 5.8.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

andersnoren avatar Sep 09 '21 09:09 andersnoren

I can reproduce and confirm this.

The duplicated block doesn't really revert to 'Justify Left' though. The justify class items-justified-x is not carried over with the duplication, and is empty on the duplicated block.

Sandstromer avatar Sep 09 '21 10:09 Sandstromer

CC: @mkaz in case you'd want to pair on this one, or have additional context.

jasmussen avatar Sep 20 '21 06:09 jasmussen

I could not duplicate this. In fact, when using the latest Gutenberg plugin it does not add those utility classes but appear to be setting the alignment for the container. It looks like it might of been changed in this one.

social-justify

Can we confirm this is still an issue?

mkaz avatar Oct 06 '21 22:10 mkaz

I can't replicate it in 11.6.0 either, so it seems like it's been fixed.

andersnoren avatar Oct 07 '21 06:10 andersnoren