Changeset 29556
- Timestamp:
- 08/20/2014 07:28:11 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/media-views.js
r29555 r29556 4894 4894 selection.add( models ); 4895 4895 selection.single( model ); 4896 4897 // When selecting attachments, focus should be transferred to the right details panel4898 if ( ! isTouchDevice ) {4899 $('.attachment-details input').first().focus();4900 }4901 4902 4896 return; 4903 4897 … … 4907 4901 selection[ this.selected() ? 'remove' : 'add' ]( model ); 4908 4902 selection.single( model ); 4909 4910 if ( ! isTouchDevice && this.selected() ) {4911 // When selecting an attachment, focus should be transferred to the right details panel4912 $('.attachment-details input').first().focus();4913 }4914 4915 4903 return; 4916 4904 } else if ( 'add' === method ) { … … 4975 4963 4976 4964 // Add 'selected' class to model, set aria-checked to true and make the checkbox tabable. 4977 this.$el.addClass( 'selected' ).attr( 'aria-checked', true ) 4978 .find( '.check' ).attr( 'tabindex', '0' ); 4979 4980 // When selecting an attachment, focus should be transferred to the right details panel. 4981 if ( ! isTouchDevice ) { 4982 $('.attachment-details input').first().focus(); 4983 } 4965 this.$el.addClass( 'selected' ).attr( 'aria-checked', true ).find( '.check' ).attr( 'tabindex', '0' ); 4984 4966 }, 4985 4967 /** … … 6503 6485 rerenderOnModelChange: false 6504 6486 }); 6487 6488 this.on( 'ready', this.initialFocus ); 6505 6489 /** 6506 6490 * call 'initialize' directly on the parent class 6507 6491 */ 6508 6492 media.view.Attachment.prototype.initialize.apply( this, arguments ); 6493 }, 6494 6495 initialFocus: function() { 6496 if ( ! isTouchDevice ) { 6497 this.$( ':input' ).eq( 0 ).focus(); 6498 } 6509 6499 }, 6510 6500 /**
Note: See TracChangeset
for help on using the changeset viewer.