gutenberg
gutenberg copied to clipboard
Content wraps above left-aligned embed blocks instead of clearing them
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
- Create a new post/page
- Add an embed block (YouTube, Vimeo, or Spotify)
- Set the embed block alignment to "left"
- Add multiple embed blocks aligned left
- Add other embed blocks with default none alignment after the embeds
- 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