Changeset 32952 for trunk/src/wp-includes/js/media-views.js
- Timestamp:
- 06/26/2015 05:00:42 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/media-views.js
r32909 r32952 2626 2626 'change [data-setting] select': 'updateSetting', 2627 2627 'change [data-setting] textarea': 'updateSetting', 2628 'click . close':'removeFromLibrary',2628 'click .attachment-close': 'removeFromLibrary', 2629 2629 'click .check': 'checkClickHandler', 2630 'click a': 'preventDefault',2631 'keydown .close': 'removeFromLibrary',2632 2630 'keydown': 'toggleSelectionHandler' 2633 2631 }, … … 2757 2755 var method; 2758 2756 2759 // Don't do anything inside inputs .2760 if ( 'INPUT' === event.target.nodeName ) {2757 // Don't do anything inside inputs and on the attachment check and remove buttons. 2758 if ( 'INPUT' === event.target.nodeName || 'BUTTON' === event.target.nodeName ) { 2761 2759 return; 2762 2760 } … … 2944 2942 }, 2945 2943 /** 2946 * @param {Object} event2947 */2948 preventDefault: function( event ) {2949 event.preventDefault();2950 },2951 /**2952 2944 * @param {string} size 2953 2945 * @returns {Object} … … 3198 3190 initialFocus: function() { 3199 3191 if ( ! wp.media.isTouchDevice ) { 3200 this.$( ':input' ).eq( 0 ).focus(); 3192 /* 3193 Previously focused the first ':input' (the readonly URL text field). 3194 Since the first ':input' is now a button (delete/trash): when pressing 3195 spacebar on an attachment, Firefox fires deleteAttachment/trashAttachment 3196 as soon as focus is moved. Explicitly target the first text field for now. 3197 @todo change initial focus logic, also for accessibility. 3198 */ 3199 this.$( 'input[type="text"]' ).eq( 0 ).focus(); 3201 3200 } 3202 3201 },
Note: See TracChangeset
for help on using the changeset viewer.