Insert Media: Don't select a model if it's already selected.
props avryl, adamsilverstein. fixes #29152. Built from https://develop.svn.wordpress.org/trunk@29553 git-svn-id: http://core.svn.wordpress.org/trunk@29328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2808d5c523
commit
9f91625fb6
|
@ -5009,10 +5009,16 @@
|
|||
return;
|
||||
}
|
||||
|
||||
// Bail if the model is already selected.
|
||||
if ( this.$el.hasClass( 'selected' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Add 'selected' class to model, set aria-checked to true and make the checkbox tabable.
|
||||
this.$el.addClass( 'selected' ).attr( 'aria-checked', true )
|
||||
.find( '.check' ).attr( 'tabindex', '0' );
|
||||
|
||||
// When selecting an attachment, focus should be transferred to the right details panel
|
||||
// When selecting an attachment, focus should be transferred to the right details panel.
|
||||
if ( ! isTouchDevice ) {
|
||||
$('.attachment-details input').first().focus();
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue