Skip to content

Block Library: Caption component is rendered when multiple blocks are selected #57369

Closed

Description

@t-hamano

Description

Similar to #57357

A common Caption component is currently used to render the caption in the following blocks:

  • Image
  • Audio
  • Gallery
  • Video

The Caption control also appears on the block toolbar when multiple blocks are selected. This is unexpected behavior, and nothing happens when you click, and you may inadvertently delete caption text.

Step-by-step reproduction instructions

Note: As for the Image block, it will be solved by #57357.

  • Insert multiple blocks of Gallery, Video, or Image.
  • Select those blocks.
  • A caption button should now appear on the block toolbar.

Screenshots, screen recording, code snippet

e839a2895221d497fcabf7326cdc5820.mp4

Environment info

No response

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

Activity

  1. added
    [Type] Bug
    [Feature] Block Multi Selection
    [Block] Image
    [Block] Gallery
    [Block] Video
    [Package] Block library
    on Dec 26, 2023
  2. removed
    [Block] Image
    on Dec 26, 2023
  3. Mamaduka commented on Dec 26, 2023

    @Mamaduka
    Member

    @t-hamano, I will tentatively assign this to myself and try to push PR later today.

  4. self-assigned this
    on Dec 26, 2023
  5. t-hamano commented on Dec 27, 2023

    @t-hamano
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Block] Gallery[Block] Video[Feature] Block Multi Selection[Package] Block library[Type] Bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions