Skip to content

Duplicate "Regenerate Alt Text" button appears in Block Editor sidebar when navigating between blocks #16

@abdullah1908

Description

@abdullah1908

While testing the Block Editor in WordPress 7.0 RC1, a UI issue was observed where the "Regenerate Alt Text" button appears multiple times in the right sidebar.

This occurs when navigating between different blocks, particularly when switching in and out of Image blocks. The button is duplicated instead of being rendered once per block selection.

Steps to Reproduce

  • Open the Block Editor for a post or page.
  • Insert or select an Image block.
  • Navigate between different blocks (e.g., Paragraph → Image → Paragraph → Image).
  • Observe the right sidebar (Block settings panel).
  • Expected Behavior
  • Only one "Regenerate Alt Text" button should be displayed for the selected Image block.

Actual Behavior

  • Multiple "Regenerate Alt Text" buttons are displayed in the sidebar.

Additional Notes

  • This may be caused by improper component unmounting or repeated rendering when switching between blocks.
  • The issue persists during the same editing session once triggered.

Environment

  • WordPress: 7.0 RC1
  • Editor: Block Editor (Gutenberg)
  • Browser: Microsoft Edge & Google Chrome
  • OS: Windows 11

Attachments

  • Screenshot showing duplicate buttons
  • Screencast video demonstrating the issue

You may find screenshot & screencast on this link: https://drive.google.com/drive/folders/1w2mjSUQQtKW82riiCaruckMsnz8lZ4eX

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions