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

Fix: Image Block: Update media link when image is replaced #17226

Conversation

donmhico
Copy link
Contributor

Description

Update the Media Link in the image block when the image is replaced.

How has this been tested?

  1. Confirmed the bug by following the steps provided in Image Block maintains link to previous media after replacing an image #17119.
  2. Applied the changes / additions.
  3. No longer able to reproduce the bug.

Types of changes

Fixes #17119.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.

@talldan talldan added [Block] Image Affects the Image Block [Type] Bug An existing feature does not function as intended labels Aug 29, 2019
Copy link
Contributor

@draganescu draganescu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested this and it worked in fixing the link destination bug. The code is a simple update of the function used to set the a new image in the block onSelectImage and handles updating previously set props.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image Block maintains link to previous media after replacing an image
4 participants