Changeset 50547
- Timestamp:
- 03/18/2021 06:59:34 PM (4 years ago)
- Location:
- trunk/src/js
- Files:
-
- 42 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/comment.js
r50001 r50547 12 12 * @param {jQuery} $ The jQuery object. 13 13 */ 14 jQuery( document).ready(function($) {14 jQuery( function($) { 15 15 16 16 postboxes.add_postbox_toggles('comment'); -
trunk/src/js/_enqueues/admin/common.js
r50429 r50547 484 484 }; 485 485 486 $ document.ready(function(){columns.init();});486 $( function() { columns.init(); } ); 487 487 488 488 /** … … 803 803 } ); 804 804 805 $ document.ready( function() {805 $( function() { 806 806 var checks, first, last, checked, sliced, mobileEvent, transitionTimeout, focusedRowActions, 807 807 lastClicked = false, … … 1707 1707 1708 1708 self.trigger(); 1709 $document.on( 'wp-window-resized.wp-responsive', $.proxy( this.trigger,this ) );1709 $document.on( 'wp-window-resized.wp-responsive', this.trigger.bind( this ) ); 1710 1710 1711 1711 // This needs to run later as UI Sortable may be initialized later on $(document).ready(). … … 1890 1890 } 1891 1891 1892 $( document ). ajaxComplete(function() {1892 $( document ).on( 'ajaxComplete', function() { 1893 1893 aria_button_if_js(); 1894 1894 }); … … 2009 2009 * @since 5.5.0 2010 2010 */ 2011 $ document.ready( function( $ ) {2011 $( function( $ ) { 2012 2012 var $overwrite, $warning; 2013 2013 -
trunk/src/js/_enqueues/admin/custom-background.js
r50420 r50547 13 13 */ 14 14 (function($) { 15 $( document).ready(function() {15 $( function() { 16 16 var frame, 17 17 bgImage = $( '#custom-background-image' ); -
trunk/src/js/_enqueues/admin/edit-comments.js
r50420 r50547 1226 1226 }; 1227 1227 1228 $( document).ready(function(){1228 $( function(){ 1229 1229 var make_hotkeys_redirect, edit_comment, toggle_all, make_bulk; 1230 1230 -
trunk/src/js/_enqueues/admin/inline-edit-post.js
r50001 r50547 517 517 }; 518 518 519 $( document ).ready( function(){ inlineEditPost.init(); } );519 $( function() { inlineEditPost.init(); } ); 520 520 521 521 // Show/hide locks on posts. 522 $( document ).on( 'heartbeat-tick.wp-check-locked-posts', function( e, data ) { 522 $( function() { 523 524 // Set the heartbeat interval to 15 seconds. 525 if ( typeof wp !== 'undefined' && wp.heartbeat ) { 526 wp.heartbeat.interval( 15 ); 527 } 528 }).on( 'heartbeat-tick.wp-check-locked-posts', function( e, data ) { 523 529 var locked = data['wp-check-locked-posts'] || {}; 524 530 … … 561 567 data['wp-check-locked-posts'] = check; 562 568 } 563 }).ready( function() {564 565 // Set the heartbeat interval to 15 seconds.566 if ( typeof wp !== 'undefined' && wp.heartbeat ) {567 wp.heartbeat.interval( 15 );568 }569 569 }); 570 570 -
trunk/src/js/_enqueues/admin/inline-edit-tax.js
r50001 r50547 290 290 }; 291 291 292 $( document).ready(function(){inlineEditTax.init();});292 $( function() { inlineEditTax.init(); } ); 293 293 294 294 })( jQuery, window.wp ); -
trunk/src/js/_enqueues/admin/link.js
r50420 r50547 5 5 /* global postboxes, deleteUserSetting, setUserSetting, getUserSetting */ 6 6 7 jQuery( document).ready(function($) {7 jQuery( function($) { 8 8 9 9 var newCat, noSyncChecks = false, syncChecks, catAddAfter; … … 82 82 var t = $($(this).text()); 83 83 t.find( 'label' ).each( function() { 84 var th = $(this), val = th.find('input').val(), id = th.find('input')[0].id, name = $.trim( th.text() ), o; 84 var th = $(this), 85 val = th.find('input').val(), 86 id = th.find('input')[0].id, 87 name = th.text().trim(), 88 o; 85 89 $('#' + id).on( 'change', syncChecks ); 86 90 o = $( '<option value="' + parseInt( val, 10 ) + '"></option>' ).text( name ); -
trunk/src/js/_enqueues/admin/media.js
r50420 r50547 141 141 * @return {void} 142 142 */ 143 $( document ).ready(function() {143 $( function() { 144 144 var settings, $mediaGridWrap = $( '#wp-media-grid' ); 145 145 -
trunk/src/js/_enqueues/admin/plugin-install.js
r50420 r50547 7 7 /* global tb_click, tb_remove, tb_position */ 8 8 9 jQuery( document ).ready(function( $ ) {9 jQuery( function( $ ) { 10 10 11 11 var tbWindow, -
trunk/src/js/_enqueues/admin/post.js
r50420 r50547 261 261 } 262 262 263 $(document).on( 'heartbeat-send.wp-refresh-nonces', function( e, data ) { 263 $( function() { 264 schedule(); 265 }).on( 'heartbeat-send.wp-refresh-nonces', function( e, data ) { 264 266 var post_id, 265 267 $authCheck = $('#wp-auth-check-wrap'); … … 287 289 window.heartbeatSettings.nonce = nonces.heartbeatNonce; 288 290 } 289 }).ready( function() {290 schedule();291 291 }); 292 292 }(jQuery)); … … 295 295 * All post and postbox controls and functionality. 296 296 */ 297 jQuery( document).ready(function($) {297 jQuery( function($) { 298 298 var stamp, visibility, $submitButtons, updateVisibility, updateText, 299 299 $textarea = $('#content'), … … 662 662 e.preventDefault(); 663 663 $('#' + taxonomy + '-adder').toggleClass( 'wp-hidden-children' ); 664 $('a[href="#' + taxonomy + '-all"]', '#' + taxonomy + '-tabs'). click();664 $('a[href="#' + taxonomy + '-all"]', '#' + taxonomy + '-tabs').trigger( 'click' ); 665 665 $('#new'+taxonomy).trigger( 'focus' ); 666 666 }); -
trunk/src/js/_enqueues/admin/privacy-tools.js
r50420 r50547 6 6 7 7 // Privacy request action handling. 8 jQuery( document ).ready(function( $ ) {8 jQuery( function( $ ) { 9 9 var __ = wp.i18n.__, 10 10 copiedNoticeTimeout; -
trunk/src/js/_enqueues/admin/site-health.js
r50367 r50547 7 7 /* global ajaxurl, ClipboardJS, SiteHealth, wp */ 8 8 9 jQuery( document ).ready(function( $ ) {9 jQuery( function( $ ) { 10 10 11 11 var __ = wp.i18n.__, -
trunk/src/js/_enqueues/admin/tags-box.js
r50420 r50547 28 28 // Trim the values and ensure they are unique. 29 29 $.each( array, function( key, val ) { 30 val = $.trim( val ); 30 val = val || ''; 31 val = val.trim(); 31 32 32 33 if ( val && $.inArray( val, out ) === -1 ) { … … 97 98 // Sanitize the current tags and push them as if they're new tags. 98 99 $.each( current_tags, function( key, val ) { 99 val = $.trim( val ); 100 val = val || ''; 101 val = val.trim(); 100 102 if ( val ) { 101 103 new_tags.push( val ); … … 149 151 var listItem, xbutton; 150 152 151 val = $.trim( val ); 153 val = val || ''; 154 val = val.trim(); 152 155 153 156 if ( ! val ) -
trunk/src/js/_enqueues/admin/tags.js
r50001 r50547 10 10 /* global ajaxurl, wpAjax, showNotice, validateForm */ 11 11 12 jQuery( document).ready(function($) {12 jQuery( function($) { 13 13 14 14 var addingTerm = false; -
trunk/src/js/_enqueues/admin/user-profile.js
r50420 r50547 320 320 } 321 321 322 $( document).ready(function() {322 $( function() { 323 323 var $colorpicker, $stylesheet, user_id, current_user_id, 324 324 select = $( '#display_name' ), … … 375 375 } 376 376 377 var display_name = $.trim( this.value) || current_name;377 var display_name = this.value.trim() || current_name; 378 378 379 379 greeting.text( display_name ); … … 467 467 * See ticket #39638. 468 468 */ 469 $( document ).ready(function() {469 $( function() { 470 470 if ( $( '.reset-pass-submit' ).length ) { 471 471 $( '.reset-pass-submit button.wp-generate-pw' ).trigger( 'click' ); -
trunk/src/js/_enqueues/admin/widgets.js
r50420 r50547 742 742 }; 743 743 744 $ document.ready( function(){ wpWidgets.init(); } );744 $( function(){ wpWidgets.init(); } ); 745 745 746 746 })(jQuery); -
trunk/src/js/_enqueues/admin/xfn.js
r50367 r50547 5 5 * @output wp-admin/js/xfn.js 6 6 */ 7 jQuery( document ).ready(function( $ ) {7 jQuery( function( $ ) { 8 8 $( '#link_rel' ).prop( 'readonly', true ); 9 9 $( '#linkxfndiv input' ).on( 'click keyup', function() { -
trunk/src/js/_enqueues/lib/accordion.js
r47122 r50547 32 32 ( function( $ ){ 33 33 34 $( document ).ready(function () {34 $( function () { 35 35 36 36 // Expand/Collapse accordion sections on click. -
trunk/src/js/_enqueues/lib/ajax-response.js
r50420 r50547 66 66 67 67 // Basic form validation. 68 jQuery( document).ready(function($){68 jQuery( function($){ 69 69 $('form.validate').on( 'submit', function() { return wpAjax.validateForm( $(this) ); } ); 70 70 }); -
trunk/src/js/_enqueues/lib/auth-check.js
r48339 r50547 145 145 * @param {Object} data Response data. 146 146 */ 147 $( document ).on( 'heartbeat-tick.wp-auth-check', function( e, data ) { 148 if ( 'wp-auth-check' in data ) { 149 if ( ! data['wp-auth-check'] && wrap.hasClass( 'hidden' ) && ! tempHidden ) { 150 show(); 151 } else if ( data['wp-auth-check'] && ! wrap.hasClass( 'hidden' ) ) { 152 hide(); 153 } 154 } 155 }).ready( function() { 147 $( function() { 156 148 157 149 /** … … 167 159 setShowTimeout(); 168 160 }); 161 }).on( 'heartbeat-tick.wp-auth-check', function( e, data ) { 162 if ( 'wp-auth-check' in data ) { 163 if ( ! data['wp-auth-check'] && wrap.hasClass( 'hidden' ) && ! tempHidden ) { 164 show(); 165 } else if ( data['wp-auth-check'] && ! wrap.hasClass( 'hidden' ) ) { 166 hide(); 167 } 168 } 169 169 }); 170 170 -
trunk/src/js/_enqueues/lib/color-picker.js
r50420 r50547 102 102 103 103 // Bind the close event. 104 self.close = $.proxy( self.close,self );104 self.close = self.close.bind( self ); 105 105 106 106 self.initialValue = el.val(); … … 278 278 self.element.val( '' ); 279 279 self.toggler.css( 'backgroundColor', '' ); 280 if ( $.isFunction( self.options.clear )) {280 if ( typeof self.options.clear === 'function' ) { 281 281 self.options.clear.call( this, event ); 282 282 } -
trunk/src/js/_enqueues/lib/gallery.js
r50420 r50547 5 5 /* global unescape, getUserSetting, setUserSetting, wpgallery, tinymce */ 6 6 7 jQuery( document).ready(function($) {7 jQuery( function($) { 8 8 var gallerySortable, gallerySortableInit, sortIt, clearAll, w, desc = false; 9 9 -
trunk/src/js/_enqueues/lib/link.js
r50420 r50547 94 94 // If URL wasn't corrected last time and doesn't start with http:, https:, ? # or /, prepend http://. 95 95 correctURL: function () { 96 var url = $.trim( inputs.url.val());96 var url = inputs.url.val().trim(); 97 97 98 98 if ( url && correctedURL !== url && ! /^(?:[a-z]+:|#|\?|\.|\/)/.test( url ) ) { … … 239 239 href = linkNode.attr( 'href' ); 240 240 241 if ( ! $.trim( linkText) ) {241 if ( ! linkText.trim() ) { 242 242 linkText = text || ''; 243 243 } … … 313 313 314 314 return { 315 href: $.trim( inputs.url.val()),315 href: inputs.url.val().trim(), 316 316 target: inputs.openInNewTab.prop( 'checked' ) ? '_blank' : null 317 317 }; … … 426 426 editor.execCommand( 'mceInsertLink', false, { href: '_wp_link_placeholder', 'data-wp-temp-link': 1 } ); 427 427 $link = editor.$( 'a[data-wp-temp-link="1"]' ).removeAttr( 'data-wp-temp-link' ); 428 hasText = $ .trim( $link.text());428 hasText = $link.text().trim(); 429 429 } 430 430 … … 484 484 } 485 485 486 selection = $.trim( selection ); 486 selection = selection || ''; 487 selection = selection.trim(); 487 488 488 489 if ( selection && emailRegexp.test( selection ) ) { … … 798 799 }); 799 800 800 $( document ).ready(wpLink.init );801 $( wpLink.init ); 801 802 })( jQuery, window.wpLinkL10n, window.wp ); -
trunk/src/js/_enqueues/lib/nav-menu.js
r50420 r50547 1332 1332 }; 1333 1333 1334 $( document).ready(function() {1334 $( function() { 1335 1335 1336 1336 wpNavMenu.init(); -
trunk/src/js/_enqueues/lib/quicktags.js
r47122 r50547 58 58 59 59 if ( typeof jQuery !== 'undefined' ) { 60 jQuery( document).ready(func);60 jQuery( func ); 61 61 } else { 62 62 t = _domReady; -
trunk/src/js/_enqueues/lib/user-suggest.js
r43347 r50547 15 15 (function( $ ) { 16 16 var id = ( typeof current_site_id !== 'undefined' ) ? '&site_id=' + current_site_id : ''; 17 $( document).ready(function() {17 $( function() { 18 18 var position = { offset: '0, -1' }; 19 19 if ( typeof isRtl !== 'undefined' && isRtl ) { -
trunk/src/js/_enqueues/wp/autosave.js
r50420 r50547 583 583 */ 584 584 if ( checkStorage() && blog_id && ( $('#content').length || $('#excerpt').length ) ) { 585 $ document.ready( run );585 $( run ); 586 586 } 587 587 … … 799 799 * @return {void} 800 800 */ 801 $document.on( 'heartbeat-send.autosave', function( event, data ) { 801 $( function() { 802 _schedule(); 803 }).on( 'heartbeat-send.autosave', function( event, data ) { 802 804 var autosaveData = save(); 803 805 … … 849 851 $('#lost-connection-notice').hide(); 850 852 enableButtons(); 851 }).ready( function() {852 _schedule();853 853 }); 854 854 … … 874 874 * @return {void} 875 875 */ 876 $document.on( 'tinymce-editor-init.autosave', function( event, editor ) { 876 $( function() { 877 // Set the initial compare string in case TinyMCE is not used or not loaded first. 878 setInitialCompare(); 879 }).on( 'tinymce-editor-init.autosave', function( event, editor ) { 877 880 // Reset the initialCompare data after the TinyMCE instances have been initialized. 878 881 if ( 'content' === editor.id || 'excerpt' === editor.id ) { … … 882 885 }, 1000 ); 883 886 } 884 }).ready( function() {885 // Set the initial compare string in case TinyMCE is not used or not loaded first.886 setInitialCompare();887 887 }); 888 888 -
trunk/src/js/_enqueues/wp/customize/base.js
r50001 r50547 198 198 $.extend( this, options || {} ); 199 199 200 this.set = $.proxy( this.set,this );200 this.set = this.set.bind( this ); 201 201 }, 202 202 … … 735 735 * unbound when calling $.off( 'message', this.receive ); 736 736 */ 737 this.receive = $.proxy( this.receive,this );737 this.receive = this.receive.bind( this ); 738 738 this.receive.guid = $.guid++; 739 739 -
trunk/src/js/_enqueues/wp/customize/controls.js
r50001 r50547 290 290 } 291 291 } else if ( collection.previousActiveElement ) { 292 $( collection.previousActiveElement ). focus();292 $( collection.previousActiveElement ).trigger( 'focus' ); 293 293 collection.previousActiveElement = null; 294 294 } … … 1593 1593 expand = args.completeCallback; 1594 1594 } else { 1595 expand = $.proxy(function() {1595 expand = function() { 1596 1596 section._animateChangeExpanded( function() { 1597 1597 sectionTitle.attr( 'tabindex', '-1' ); … … 1610 1610 overlay.addClass( 'section-open' ); 1611 1611 api.state( 'expandedSection' ).set( section ); 1612 } ,this );1612 }.bind( this ); 1613 1613 } 1614 1614 … … 2697 2697 expand = args.completeCallback; 2698 2698 } else { 2699 expand = $.proxy(function() {2699 expand = function() { 2700 2700 section._animateChangeExpanded( function() { 2701 2701 sectionTitle.attr( 'tabindex', '-1' ); 2702 2702 backBtn.attr( 'tabindex', '0' ); 2703 2703 2704 backBtn. focus();2704 backBtn.trigger( 'focus' ); 2705 2705 content.css( 'top', '' ); 2706 2706 container.scrollTop( 0 ); … … 2712 2712 2713 2713 content.addClass( 'open' ); 2714 } ,this );2714 }.bind( this ); 2715 2715 } 2716 2716 … … 2957 2957 backBtn.attr( 'tabindex', '0' ); 2958 2958 2959 backBtn. focus();2959 backBtn.trigger( 'focus' ); 2960 2960 accordionSection.css( 'top', '' ); 2961 2961 container.scrollTop( 0 ); … … 3875 3875 control.container.toggleClass( 'has-notifications', 0 !== notifications.length ); 3876 3876 control.container.toggleClass( 'has-error', hasError ); 3877 container.empty().append( $.trim(3878 control.notificationsTemplate( { notifications: notifications, altNotice: Boolean( control.altNotice ) } ) 3879 ) );3877 container.empty().append( 3878 control.notificationsTemplate( { notifications: notifications, altNotice: Boolean( control.altNotice ) } ).trim() 3879 ); 3880 3880 }, 3881 3881 -
trunk/src/js/_enqueues/wp/customize/nav-menus.js
r50001 r50547 219 219 // Clear the search results and trigger an `input` event to fire a new search. 220 220 this.$clearResults.on( 'click', function() { 221 self.$search.val( '' ). focus().trigger( 'input' );221 self.$search.val( '' ).trigger( 'focus' ).trigger( 'input' ); 222 222 } ); 223 223 … … 447 447 return; 448 448 } else if ( ( 'post_type:page' === name ) && ( ! availableMenuItemContainers[ name ].hasClass( 'open' ) ) ) { 449 availableMenuItemContainers[ name ].find( '.accordion-section-title > button' ). click();449 availableMenuItemContainers[ name ].find( '.accordion-section-title > button' ).trigger( 'click' ); 450 450 } 451 451 typeItems = new api.Menus.AvailableItemCollection( typeItems ); // @todo Why is this collection created and then thrown away? … … 645 645 } 646 646 647 if ( '' === $.trim( itemName.val()) ) {647 if ( '' === itemName.val().trim() ) { 648 648 itemName.addClass( 'invalid' ); 649 649 itemName.focus(); … … 717 717 this.$el.find( '.selected' ).removeClass( 'selected' ); 718 718 719 this.$search. focus();719 this.$search.trigger( 'focus' ); 720 720 }, 721 721 … … 1880 1880 // Ensure that whitespace is trimmed on blur so placeholder can be shown. 1881 1881 control.container.find( '.edit-menu-item-title' ).on( 'blur', function() { 1882 $( this ).val( $ .trim( $( this ).val()) );1882 $( this ).val( $( this ).val().trim() ); 1883 1883 } ); 1884 1884 … … 1889 1889 return; 1890 1890 } 1891 trimmedTitle = $.trim( item.title ); 1891 item.title = item.title || ''; 1892 trimmedTitle = item.title.trim(); 1892 1893 1893 1894 titleText = trimmedTitle || item.original_title || api.Menus.data.l10n.untitled; -
trunk/src/js/_enqueues/wp/customize/widgets.js
r49586 r50547 196 196 // Clear the search results and trigger an `input` event to fire a new search. 197 197 this.$clearResults.on( 'click', function() { 198 self.$search.val( '' ). focus().trigger( 'input' );198 self.$search.val( '' ).trigger( 'focus' ).trigger( 'input' ); 199 199 } ); 200 200 … … 366 366 367 367 if ( ! api.settings.browser.mobile ) { 368 this.$search. focus();368 this.$search.trigger( 'focus' ); 369 369 } 370 370 }, … … 422 422 423 423 if ( selected ) { 424 selected. focus();424 selected.trigger( 'focus' ); 425 425 } else { 426 this.$search. focus();426 this.$search.trigger( 'focus' ); 427 427 } 428 428 … … 819 819 return; 820 820 } 821 $( this ). focus();821 $( this ).trigger( 'focus' ); 822 822 823 823 if ( $( this ).is( '.move-widget' ) ) { … … 840 840 } 841 841 842 $( this ). focus(); // Re-focus after the container was moved.842 $( this ).trigger( 'focus' ); // Re-focus after the container was moved. 843 843 } 844 844 } ); … … 1104 1104 input.prop( 'checked', state ); 1105 1105 } else if ( input.is( 'select[multiple]' ) ) { 1106 if ( ! $.isArray( state ) ) {1106 if ( ! Array.isArray( state ) ) { 1107 1107 state = []; 1108 1108 } else { … … 2090 2090 } 2091 2091 2092 controlHtml = $ .trim( $( '#widget-tpl-' + widget.get( 'id' ) ).html());2092 controlHtml = $( '#widget-tpl-' + widget.get( 'id' ) ).html().trim(); 2093 2093 if ( widget.get( 'is_multi' ) ) { 2094 2094 controlHtml = controlHtml.replace( /<[^<>]+>/g, function( m ) { -
trunk/src/js/_enqueues/wp/dashboard.js
r50420 r50547 13 13 * @since 2.7.0 14 14 */ 15 jQuery( document).ready(function($) {15 jQuery( function($) { 16 16 var welcomePanel = $( '#welcome-panel' ), 17 17 welcomePanelHide = $('#wp_welcome_panel-hide'), … … 329 329 */ 330 330 $container.on( 'submit', '.community-events-form', function( event ) { 331 var location = $ .trim( $( '#community-events-location' ).val());331 var location = $( '#community-events-location' ).val().trim(); 332 332 333 333 event.preventDefault(); -
trunk/src/js/_enqueues/wp/editor/base.js
r49841 r50547 1179 1179 1180 1180 if ( $ ) { 1181 $( document ).ready(init );1181 $( init ); 1182 1182 } else if ( document.addEventListener ) { 1183 1183 document.addEventListener( 'DOMContentLoaded', init, false ); -
trunk/src/js/_enqueues/wp/heartbeat.js
r48168 r50547 235 235 236 236 // Start one tick after DOM ready. 237 $ document.ready( function() {237 $( function() { 238 238 settings.lastTick = time(); 239 239 scheduleNextTick(); -
trunk/src/js/_enqueues/wp/svg-painter.js
r50420 r50547 13 13 elements = []; 14 14 15 $( document).ready(function() {15 $( function() { 16 16 // Detection for browser SVG capability. 17 17 if ( document.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#Image', '1.1' ) ) { -
trunk/src/js/_enqueues/wp/theme-plugin-editor.js
r50001 r50547 329 329 */ 330 330 codeEditorSettings.onTabPrevious = function() { 331 $( '#templateside' ).find( ':tabbable' ).last(). focus();331 $( '#templateside' ).find( ':tabbable' ).last().trigger( 'focus' ); 332 332 }; 333 333 … … 340 340 */ 341 341 codeEditorSettings.onTabNext = function() { 342 $( '#template' ).find( ':tabbable:not(.CodeMirror-code)' ).first(). focus();342 $( '#template' ).find( ':tabbable:not(.CodeMirror-code)' ).first().trigger( 'focus' ); 343 343 }; 344 344 -
trunk/src/js/_enqueues/wp/theme.js
r50001 r50547 2062 2062 2063 2063 // Ready... 2064 $( document ).ready(function() {2064 $( function() { 2065 2065 if ( themes.isInstall ) { 2066 2066 themes.RunInstaller.init(); … … 2090 2090 2091 2091 // Align theme browser thickbox. 2092 jQuery( document).ready(function($) {2092 jQuery( function($) { 2093 2093 window.tb_position = function() { 2094 2094 var tbWindow = $('#TB_window'), -
trunk/src/js/_enqueues/wp/updates.js
r50420 r50547 1804 1804 1805 1805 if ( wp.updates.$elToReturnFocusToFromCredentialsModal ) { 1806 wp.updates.$elToReturnFocusToFromCredentialsModal. focus();1806 wp.updates.$elToReturnFocusToFromCredentialsModal.trigger( 'focus' ); 1807 1807 } 1808 1808 }; -
trunk/src/js/_enqueues/wp/widgets/media.js
r50001 r50547 552 552 control.$el.on( 'input change', '.title', function updateTitle() { 553 553 control.model.set({ 554 title: $ .trim( $( this ).val())554 title: $( this ).val().trim() 555 555 }); 556 556 }); … … 558 558 // Update link_url attribute. 559 559 control.$el.on( 'input change', '.link', function updateLinkUrl() { 560 var linkUrl = $ .trim( $( this ).val()), linkType = 'custom';560 var linkUrl = $( this ).val().trim(), linkType = 'custom'; 561 561 if ( control.selectedAttachment.get( 'linkUrl' ) === linkUrl || control.selectedAttachment.get( 'link' ) === linkUrl ) { 562 562 linkType = 'post'; -
trunk/src/js/media/views/embed/url.js
r46800 r50547 58 58 59 59 url: function( event ) { 60 this.model.set( 'url', $.trim( event.target.value ) ); 60 var url = event.target.value || ''; 61 this.model.set( 'url', url.trim() ); 61 62 } 62 63 }); -
trunk/src/js/media/views/modal.js
r50264 r50547 134 134 135 135 // Pause current audio/video even after closing the modal. 136 $( '.mejs-pause button' ). click();136 $( '.mejs-pause button' ).trigger( 'click' ); 137 137 138 138 // Enable page scrolling. … … 156 156 $( '#wpbody-content' ) 157 157 .attr( 'tabindex', '-1' ) 158 . focus();158 .trigger( 'focus' ); 159 159 } 160 160 -
trunk/src/js/media/views/uploader/inline.js
r50352 r50547 135 135 .attr( 'aria-expanded', 'false' ) 136 136 // Move focus back to the toggle button when closing the uploader. 137 . focus();137 .trigger( 'focus' ); 138 138 } 139 139 }
Note: See TracChangeset
for help on using the changeset viewer.