Skip to content

Image Block is replaced as a Youtube block after dragging multiple blocks outside their parent #61778

@jeflopodev

Description

@jeflopodev

Description

I have created blank theme with the Create Block Theme Plugin.
I have created a post and I added the following blocks structure:

  • Group
    • Group
      • Heading
      • Paragraph
      • Image
      • Youtube (I have created this block by pasting the video URL in the post editor)

Then I have selected the Heading, Paragraph, Image and Youtube blocks and dragged them outside their parent.

The image block got replaced by another instance of a youtube block, with the same video. Doesn't matter if I drag it one level upper or at root level.

Seems to happen only when an Image block is sibling of the youtube block. I can't replicate this behavior with the paragraph or heading blocks.

After dragging the blocks, and trying to press Undo I need to spam it multiple times till I get to the state before dragging the blocks. Doing single clicks to it doesn't work.

I also tried with the TT4 theme. And the exact same happens.

Step-by-step reproduction instructions

  1. Create a blank theme using Create Block Theme (or use the TT4 theme)
  2. Create a new post
  3. Create a Group Block within another Group Block that contains at least one image block and a Youtube block (siblings).
  4. Create a multiple selection that comprehends at least the image and youtube blocks.
  5. Drag those blocks outside of it's parent.
  6. Check if the image block got converted to a Youtube Block
  7. Check if single clicks to the undo button doesn't work
  8. Check if you have to spam click the undo button for it to work again

Screenshots, screen recording, code snippet

gg.mp4

Environment info

  • WP 5.3.0
  • Gutenberg 18.3.0
  • Blank theme created with the Create Block Theme Plugin
  • Chrome v124.0.6367.209
  • Desktop Windows 11 23H2

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] ImageAffects the Image Block[Feature] Drag and DropDrag and drop functionality when working with blocks[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