[wp-trac] [WordPress Trac] #36521: Setting media control value through JavaScript API does not update control template
WordPress Trac
noreply at wordpress.org
Thu Apr 14 01:29:53 UTC 2016
#36521: Setting media control value through JavaScript API does not update control
template
-------------------------------+-----------------------------
Reporter: TimothyBlynJacobs | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 4.2
Severity: normal | Keywords:
Focuses: javascript |
-------------------------------+-----------------------------
When setting the value of a MediaControl through the JS API, the control
in the customizer still displays the old image previews. This is because
the internal `params.attachment` data is not set to the new value.
Attached is a patch that will update the internal `params.attachment` data
if necessary. This could be worked around in the client code, but it is
certainly unexpected behavior, and since there is already a call to
`wp.media.attachment( value ).fetch()` it seems like this should belong in
the control itself.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36521>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list