WordPress.org

Make WordPress Core

Changeset 29553


Ignore:
Timestamp:
08/20/2014 05:19:02 PM (6 years ago)
Author:
ocean90
Message:

Insert Media: Don't select a model if it's already selected.

props avryl, adamsilverstein.
fixes #29152.

File:
1 edited

Legend:

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

    r29547 r29553  
    50105010            }
    50115011
     5012            // Bail if the model is already selected.
     5013            if ( this.$el.hasClass( 'selected' ) ) {
     5014                return;
     5015            }
     5016
     5017            // Add 'selected' class to model, set aria-checked to true and make the checkbox tabable.
    50125018            this.$el.addClass( 'selected' ).attr( 'aria-checked', true )
    50135019                    .find( '.check' ).attr( 'tabindex', '0' );
    50145020
    5015             // When selecting an attachment, focus should be transferred to the right details panel
     5021            // When selecting an attachment, focus should be transferred to the right details panel.
    50165022            if ( ! isTouchDevice ) {
    50175023                $('.attachment-details input').first().focus();
Note: See TracChangeset for help on using the changeset viewer.