gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Content wraps above left-aligned embed blocks instead of clearing them

Open Mustafabharmal opened this issue 10 months ago • 0 comments

Description

When embed blocks (YouTube, Vimeo, Spotify, etc.) are aligned to the left, subsequent content wraps around and floats above the embedded content instead of appearing below it. This creates an undesirable layout where text and other blocks overlap with the visual space of the embeds

Step-by-step reproduction instructions

  1. Create a new post/page
  2. Add an embed block (YouTube, Vimeo, or Spotify)
  3. Set the embed block alignment to "left"
  4. Add multiple embed blocks aligned left
  5. Add other embed blocks with default none alignment after the embeds
  6. Observe that the embeds added last appears above the embeds which was done at the first with alignment left.

Sample code to reproduce this

<!-- wp:embed {"url":"https://vimeo.com/347119375","type":"video","providerNameSlug":"vimeo","responsive":true,"align":"left","className":"wp-embed-aspect-16-9 wp-has-aspect-ratio"} -->
<figure class="wp-block-embed alignleft is-type-video is-provider-vimeo wp-block-embed-vimeo wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
https://vimeo.com/347119375
</div></figure>
<!-- /wp:embed -->

<!-- wp:embed {"url":"https://www.youtube.com/watch?v=K4TOrB7at0Y","type":"video","providerNameSlug":"youtube","responsive":true,"align":"left","className":"wp-embed-aspect-16-9 wp-has-aspect-ratio"} -->
<figure class="wp-block-embed alignleft is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
https://www.youtube.com/watch?v=K4TOrB7at0Y
</div></figure>
<!-- /wp:embed -->

<!-- wp:embed {"url":"https://open.spotify.com/track/5MCbGWnNLLjoHpbDO3BOgi?si=3c838265af424e1c","type":"rich","providerNameSlug":"spotify","responsive":true,"className":"wp-embed-aspect-21-9 wp-has-aspect-ratio"} -->
<figure class="wp-block-embed is-type-rich is-provider-spotify wp-block-embed-spotify wp-embed-aspect-21-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
https://open.spotify.com/track/5MCbGWnNLLjoHpbDO3BOgi?si=3c838265af424e1c
</div></figure>
<!-- /wp:embed -->

<!-- wp:embed {"url":"https://open.spotify.com/playlist/37i9dQZEVXbMWDif5SCBJq?si=3W-NVEz_S7C9RpddYPKuow","type":"rich","providerNameSlug":"spotify","responsive":true,"className":"wp-embed-aspect-21-9 wp-has-aspect-ratio"} -->
<figure class="wp-block-embed is-type-rich is-provider-spotify wp-block-embed-spotify wp-embed-aspect-21-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
https://open.spotify.com/playlist/37i9dQZEVXbMWDif5SCBJq?si=3W-NVEz_S7C9RpddYPKuow
</div></figure>
<!-- /wp:embed -->

<!-- wp:embed {"url":"https://open.spotify.com/track/5MCbGWnNLLjoHpbDO3BOgi?si=3c838265af424e1c","type":"rich","providerNameSlug":"spotify","responsive":true,"className":"wp-embed-aspect-21-9 wp-has-aspect-ratio"} -->
<figure class="wp-block-embed is-type-rich is-provider-spotify wp-block-embed-spotify wp-embed-aspect-21-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
https://open.spotify.com/track/5MCbGWnNLLjoHpbDO3BOgi?si=3c838265af424e1c
</div></figure>
<!-- /wp:embed -->

<!-- wp:embed {"url":"https://open.spotify.com/playlist/37i9dQZEVXbMWDif5SCBJq?si=3W-NVEz_S7C9RpddYPKuow","type":"rich","providerNameSlug":"spotify","responsive":true,"className":"wp-embed-aspect-21-9 wp-has-aspect-ratio"} -->
<figure class="wp-block-embed is-type-rich is-provider-spotify wp-block-embed-spotify wp-embed-aspect-21-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
https://open.spotify.com/playlist/37i9dQZEVXbMWDif5SCBJq?si=3W-NVEz_S7C9RpddYPKuow
</div></figure>
<!-- /wp:embed -->

Screenshots, screen recording, code snippet

https://github.com/user-attachments/assets/e661b58e-6b2c-4725-9295-0913becabd7d

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • [x] Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • [x] Yes

Please confirm which theme type you used for testing.

  • [x] Block
  • [ ] Classic
  • [ ] Hybrid (e.g. classic with theme.json)
  • [ ] Not sure

Mustafabharmal avatar Feb 02 '26 21:02 Mustafabharmal