Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#22593 closed defect (bug) (fixed)

Gallery view: Fields are not saved when another image is selected

Reported by: ocean90 Owned by: koopersmith
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch needs-testing commit
Focuses: Cc:



  • Open the media modal
  • Select two images
  • Create a gallery
  • Select the first image
  • Change the alt text
  • Select the second image (leave the text field be focused)
  • Select the first image => alt text is unchanged

Seems to be only in the gallery view.

Attachments (3)

22593.diff (5.7 KB) - added by koopersmith 3 years ago.
22593.2.diff (5.9 KB) - added by koopersmith 3 years ago.
22593.empty.diff (386 bytes) - added by koopersmith 3 years ago.

Download all attachments as: .zip

Change History (10)

#1 @nacin
3 years ago

  • Owner set to koopersmith
  • Status changed from new to assigned

3 years ago

#2 @koopersmith
3 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

Patch ensures that any changed properties are saved before an Attachment view is destroyed. Patch also finishes the conversion of the Attachments view to use media.Views and always runs media.View.prepare.

3 years ago

#3 @koopersmith
3 years ago

Address a race condition in the saving.

#4 @ryan
3 years ago

  • Keywords commit added

Works for me. Looks good.

#5 @nacin
3 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 22888:

Ensure attachment modal details are saved before the attachment details view is destroyed. props koopersmith. fixes #22593.

#6 @koopersmith
3 years ago

Technically, changed is an object, so it's truthy, and telling us to always fire off a request. We don't want to do that.

#7 @nacin
3 years ago

In 22892:

Check if the object is empty, as objects are always truthy. props koopersmith. see #22593.

Note: See TracTickets for help on using tickets.