Changeset 37152
- Timestamp:
- 03/30/2016 09:40:43 PM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r36866 r37152 78 78 */ 79 79 focus = function ( params ) { 80 var construct, completeCallback, focus ;80 var construct, completeCallback, focus, focusElement; 81 81 construct = this; 82 82 params = params || {}; … … 91 91 } 92 92 93 // Note that we can't use :focusable due to a jQuery UI issue. See: https://github.com/jquery/jquery-ui/pull/1583 94 focusContainer.find( 'input, select, textarea, button, object, a[href], [tabindex]' ).filter( ':visible' ).first().focus(); 93 focusElement = focusContainer.find( '.control-focus:first' ); 94 if ( 0 === focusElement.length ) { 95 // Note that we can't use :focusable due to a jQuery UI issue. See: https://github.com/jquery/jquery-ui/pull/1583 96 focusElement = focusContainer.find( 'input, select, textarea, button, object, a[href], [tabindex]' ).filter( ':visible' ).first(); 97 } 98 focusElement.focus(); 95 99 }; 96 100 if ( params.completeCallback ) { -
trunk/src/wp-includes/customize/class-wp-customize-media-control.php
r36769 r37152 197 197 <# if ( data.canUpload ) { #> 198 198 <button type="button" class="button remove-button">{{ data.button_labels.remove }}</button> 199 <button type="button" class="button upload-button " id="{{ data.settings['default'] }}-button">{{ data.button_labels.change }}</button>199 <button type="button" class="button upload-button control-focus" id="{{ data.settings['default'] }}-button">{{ data.button_labels.change }}</button> 200 200 <div style="clear:both"></div> 201 201 <# } #>
Note: See TracChangeset
for help on using the changeset viewer.