Skip to content

Social block: block spacing attribute lost if no justification set #37542

@glendaviesnz

Description

@glendaviesnz

Description

If the block gap attribute is set using the Block spacing setting, but a justification setting is not selected, then the block gap attribute is lost when the post is reloaded in the editor:

Step-by-step reproduction instructions

  • Add a Social block
  • Add 2 or 3 Social links child blocks
  • Set the block spacing to a > 0 value
  • Save the post and reload - note that the block spacing value is lost
  • Repeat the above but this time also set a justification option before saving and reloading and note that this time the block gap value persists

Screenshots, screen recording, code snippet

Gap attribute wiped if no justification set:
social-gap-no-justification

If justification is set then the block gap attribute is retained as expected:

social-gap-justification

Environment info

WP 5.8 and Gutenberg 12.2.0-rc.1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] SocialAffects the Social Block - used to display Social Media accounts[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions