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

Checks if caption is empty in media lib and keeps the one written #19641

Merged
merged 2 commits into from
Feb 6, 2020

Conversation

draganescu
Copy link
Contributor

Description

Closes #19636

How has this been tested?

Tested locally.

Screenshots

caption-preserved

Types of changes

Basically the behavior was there already but only for the temporary preview.

@draganescu draganescu force-pushed the fix/caption-replaced-by-empty branch from 6b49f7c to 4643556 Compare January 16, 2020 15:40
@talldan
Copy link
Contributor

talldan commented Jan 21, 2020

Looks like some tests that need to be sorted @draganescu.

@talldan talldan added the [Block] Image Affects the Image Block label Jan 21, 2020
@draganescu
Copy link
Contributor Author

@talldan tests pass! I mistakenly was treating alt the same way. Although I could do that in a separate PR, but will also need to alter a test in that case.

Anyway this here is only about the caption.

Copy link
Contributor

@tellthemachines tellthemachines left a comment

Choose a reason for hiding this comment

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

Code looks good and works as expected. Thanks for fixing this!

@draganescu draganescu merged commit 088032b into master Feb 6, 2020
@draganescu draganescu deleted the fix/caption-replaced-by-empty branch February 6, 2020 12:37
@github-actions github-actions bot added this to the Gutenberg 7.5 milestone Feb 6, 2020
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replacing an image in the Image block will remove the caption
3 participants