Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attributes are lost when changing the provider of an embed block #33231

Closed
fluiddot opened this issue Jul 6, 2021 · 0 comments · Fixed by #33235
Closed

Attributes are lost when changing the provider of an embed block #33231

fluiddot opened this issue Jul 6, 2021 · 0 comments · Fixed by #33235
Assignees
Labels
[Block] Embed Affects the Embed Block [Type] Bug An existing feature does not function as intended

Comments

@fluiddot
Copy link
Contributor

fluiddot commented Jul 6, 2021

Description

The following attributes of the embed block are lost when the provider is changed:

  • align
  • caption
  • allowResponsive

Step-by-step reproduction instructions

  1. Add an embed block.
  2. Set an URL (YouTube video example: https://youtu.be/UOcroR50808).
  3. Click on Embed button.
  4. Change alignment to Align left.
  5. Add text to the caption field.
  6. Click on Show more settings (if they're not already displayed).
  7. Uncheck Resize for smaller devices option.
  8. Edit the URL by clicking on the ✏️ button located in the block's toolbar.
  9. Set a URL from a different provider (Spotify song example: https://open.spotify.com/track/6UB9mShVLbMm0W4e6vud4C?si=3b03fa64857f4919).
  10. Click on Embed button.
  11. Observe that alignment changed to the default value (Align center).
  12. Observe that the caption text is empty.
  13. Observe that Resize for smaller devices option is now checked (the default value).

Expected behaviour

Attributes should be preserved when the URL and provider change.

Actual behaviour

Attributes are not preserved when the URL and provider change.

Screenshots or screen recording (optional)

embed-block-attributes-lost.mp4

WordPress information

  • WordPress version: 5.8-alpha-50771
  • Gutenberg version: 11.0.0-rc.1
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes

Device information

  • Device: Desktop
  • Operating system: MacOS 10.15.7
  • Browser: Chrome 91.0.4472.114
@fluiddot fluiddot added [Type] Bug An existing feature does not function as intended [Block] Embed Affects the Embed Block labels Jul 6, 2021
@fluiddot fluiddot self-assigned this Jul 6, 2021
@fluiddot fluiddot linked a pull request Jul 6, 2021 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Embed Affects the Embed Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant