Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#57461 closed defect (bug) (reported-upstream)

Core Embed and Video Block Style Class Removed in Editor

Reported by: ekyle's profile ekyle Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.1.1
Component: Editor Keywords:
Focuses: Cc:

Description

Registering a block style for the core Embed or Video block works as expected initially and the block style class is applied (e.g. is-style-test-custom-block-style). When opening a page in the editor that contains one of these styled blocks, the class associated with the block style is removed without any user interaction.

Change History (2)

#1 @ekyle
2 years ago

The issue can be replicated using a vanilla install of WordPress 6.1.1 with the Twenty Twenty-Two theme active, though it will likely happen with any other built-in theme as well. Add a child theme or a simple plugin to register a block style for the core/embed block. Create a page, embed something using the core embed block, and apply the registered block style. Save and preview, you should see the class associated with the block style in the HTML source. Now edit that same page and the class associated with the block style will be removed.

#2 @poena
2 years ago

  • Component changed from Embeds to Editor
  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

Hi!

Thank you for taking the time to file the bug report.

This is a duplicate of an issue that is already reported in the Gutenberg GitHub repository.
You can read about the issue, add any additional information, and follow the progress here:
https://github.com/WordPress/gutenberg/issues/41813

Because this is a duplicate, I will close the ticket as "reported upstream".

Note: See TracTickets for help on using tickets.