-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Gallery: Fix stuck image size options loader #36806
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
Gallery: Fix stuck image size options loader #36806
Conversation
|
Size Change: +12 B (0%) Total Size: 1.1 MB
ℹ️ View Unchanged
|
glendaviesnz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice - thank for fixing this! This worked for me in both cases. I think not displaying the menu at all if there are no images with Ids makes the most sense.
|
@andrewserong do you think this should be cherry picked into 5.9 release? |
Yes, good call. Like the other one, I've just added the Backport to WP Beta/RC label 👍. Thanks for the review! |
Description
Fixes #36554
This PR fixes the two instances I could find where the Image size options in the Gallery block results in a stuck loader:
imageSizeOptionswill always be falsy, which results in the loader always displaying. In this case, because we can't set image sizes for external images, let's hide the control altogether.NaNwhenparseIntis called. This change explicitly sets it tonull.How has this been tested?
Test a v2 gallery block with all external images
use_balanceTagsis set to0), insert a gallery block into a post or page, add a couple of images, and then replace every image with an externally linked image.Test the update button on a v1 gallery block
Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist:
*.native.jsfiles for terms that need renaming or removal).