mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +01:00
Media: Fix rendering of incorrect toolbar in the Edit view.
This switches event binding in `wp.media.controller.EditImage` to use `on` instead of `listenTo` to restore rendering of the correct toolbar when the `toolbar:render:edit-image` event fires. The existing listeners broke when we upgraded Backbone in [36546]. Props adamsilverstein. Fixes #36861 for trunk. Built from https://develop.svn.wordpress.org/trunk@37678 git-svn-id: http://core.svn.wordpress.org/trunk@37644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2600c28169
commit
bd3c735c6e
@ -462,14 +462,14 @@ EditImage = wp.media.controller.State.extend({
|
||||
* @since 3.9.0
|
||||
*/
|
||||
activate: function() {
|
||||
this.listenTo( this.frame, 'toolbar:render:edit-image', this.toolbar );
|
||||
this.frame.on( 'toolbar:render:edit-image', _.bind( this.toolbar, this ) );
|
||||
},
|
||||
|
||||
/**
|
||||
* @since 3.9.0
|
||||
*/
|
||||
deactivate: function() {
|
||||
this.stopListening( this.frame );
|
||||
this.frame.off( 'toolbar:render:edit-image' );
|
||||
},
|
||||
|
||||
/**
|
||||
|
2
wp-includes/js/media-views.min.js
vendored
2
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.6-alpha-37677';
|
||||
$wp_version = '4.6-alpha-37678';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user