WordPress.org

Make WordPress Core

Opened 20 months ago

Closed 20 months ago

Last modified 20 months 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:

Description

http://wordpress.org/support/topic/media-frame-gallery-doesnt-just-save-the-fields?replies=1

  • 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 20 months ago.
22593.2.diff (5.9 KB) - added by koopersmith 20 months ago.
22593.empty.diff (386 bytes) - added by koopersmith 20 months ago.

Download all attachments as: .zip

Change History (10)

comment:1 nacin20 months ago

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

koopersmith20 months ago

comment:2 koopersmith20 months 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.

koopersmith20 months ago

comment:3 koopersmith20 months ago

Address a race condition in the saving.

comment:4 ryan20 months ago

  • Keywords commit added

Works for me. Looks good.

comment:5 nacin20 months 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.

koopersmith20 months ago

comment:6 koopersmith20 months 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.

comment:7 nacin20 months 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.