WordPress.org

Make WordPress Core

Changeset 23098


Ignore:
Timestamp:
12/06/12 06:56:06 (3 years ago)
Author:
nacin
Message:

Media: When the attachment details view changes to another view or attachment, save compat fields on destroy. (We already do this for non-compat fields.) props koopersmith. fixes #22776.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-views.js

    r23095 r23098  
    40814081        }, 
    40824082 
     4083        dispose: function() { 
     4084            if ( this.$(':focus').length ) 
     4085                this.save(); 
     4086 
     4087            return media.View.prototype.dispose.apply( this, arguments ); 
     4088        }, 
     4089 
    40834090        render: function() { 
    40844091            var compat = this.model.get('compat'); 
     
    41014108            var data = {}; 
    41024109 
    4103             event.preventDefault(); 
     4110            if ( event ) 
     4111                event.preventDefault(); 
    41044112 
    41054113            _.each( this.$el.serializeArray(), function( pair ) { 
Note: See TracChangeset for help on using the changeset viewer.