mirror of
git://develop.git.wordpress.org/
synced 2025-02-06 07:28:49 +01:00
MCE views: Always refresh the view after updating a gallery.
This allows things like caption changes to be synced, as they are tied to the attachment and not the shortcode. props iseulde. fixes #31239. git-svn-id: https://develop.svn.wordpress.org/trunk@31343 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
90947c2c45
commit
cdbea14c09
@ -558,10 +558,9 @@ window.wp = window.wp || {};
|
||||
frame = gallery.edit( data );
|
||||
|
||||
frame.state('gallery-edit').on( 'update', function( selection ) {
|
||||
var shortcode = gallery.shortcode( selection ).string(), force;
|
||||
var shortcode = gallery.shortcode( selection ).string();
|
||||
$( node ).attr( 'data-wpview-text', window.encodeURIComponent( shortcode ) );
|
||||
force = ( data !== shortcode );
|
||||
wp.mce.views.refreshView( self, shortcode, force );
|
||||
wp.mce.views.refreshView( self, shortcode, true );
|
||||
});
|
||||
|
||||
frame.on( 'close', function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user