WordPress.org

Make WordPress Core

Changeset 29558


Ignore:
Timestamp:
08/20/2014 07:59:59 PM (5 years ago)
Author:
wonderboymusic
Message:

Cleanup after [29220]:

media.controller.Library is State/Backbone Model and should not touch views.

See #23560.

File:
1 edited

Legend:

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

    r29556 r29558  
    754754            this.get('selection').add( attachment );
    755755
    756             // Set focus back to where it goes when an attachment is selected.
    757             $( '.attachments-browser .attachments .attachment' ).first().focus();
     756            this.frame.trigger( 'library:selection:add' );
    758757        },
    759758
     
    52575256            this.collection.on( 'reset', this.render, this );
    52585257
     5258            this.listenTo( this.controller, 'library:selection:add',    this.attachmentFocus );
    52595259            this.listenTo( this.controller, 'attachment:keydown:arrow', this.arrowEvent );
    52605260
     
    52775277            // attachments get proper width applied.
    52785278            _.defer( this.setColumns, this );
     5279        },
     5280
     5281        attachmentFocus: function() {
     5282            this.$( 'li:first' ).focus();
    52795283        },
    52805284
Note: See TracChangeset for help on using the changeset viewer.