WordPress.org

Make WordPress Core

Changeset 31343


Ignore:
Timestamp:
02/05/2015 08:11:04 PM (6 years ago)
Author:
helen
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/mce-view.js

    r30694 r31343  
    559559
    560560            frame.state('gallery-edit').on( 'update', function( selection ) {
    561                 var shortcode = gallery.shortcode( selection ).string(), force;
     561                var shortcode = gallery.shortcode( selection ).string();
    562562                $( node ).attr( 'data-wpview-text', window.encodeURIComponent( shortcode ) );
    563                 force = ( data !== shortcode );
    564                 wp.mce.views.refreshView( self, shortcode, force );
     563                wp.mce.views.refreshView( self, shortcode, true );
    565564            });
    566565
Note: See TracChangeset for help on using the changeset viewer.