diff -r 34716fd837a4 -r be944660c56a wp/wp-admin/js/inline-edit-post.js --- a/wp/wp-admin/js/inline-edit-post.js Tue Dec 15 15:52:01 2020 +0100 +++ b/wp/wp-admin/js/inline-edit-post.js Wed Sep 21 18:19:35 2022 +0200 @@ -51,7 +51,7 @@ * * @return {boolean} The result of revert. */ - qeRow.keyup(function(e){ + qeRow.on( 'keyup', function(e){ // Revert changes if Escape key is pressed. if ( e.which === 27 ) { return inlineEditPost.revert(); @@ -63,7 +63,7 @@ * * @return {boolean} The result of revert. */ - bulkRow.keyup(function(e){ + bulkRow.on( 'keyup', function(e){ // Revert changes if Escape key is pressed. if ( e.which === 27 ) { return inlineEditPost.revert(); @@ -75,7 +75,7 @@ * * @return {boolean} The result of revert. */ - $( '.cancel', qeRow ).click( function() { + $( '.cancel', qeRow ).on( 'click', function() { return inlineEditPost.revert(); }); @@ -84,7 +84,7 @@ * * @return {boolean} The result of save. */ - $( '.save', qeRow ).click( function() { + $( '.save', qeRow ).on( 'click', function() { return inlineEditPost.save(this); }); @@ -93,7 +93,7 @@ * * @return {boolean} The result of save. */ - $('td', qeRow).keydown(function(e){ + $('td', qeRow).on( 'keydown', function(e){ if ( e.which === 13 && ! $( e.target ).hasClass( 'cancel' ) ) { return inlineEditPost.save(this); } @@ -104,14 +104,14 @@ * * @return {boolean} The result of revert. */ - $( '.cancel', bulkRow ).click( function() { + $( '.cancel', bulkRow ).on( 'click', function() { return inlineEditPost.revert(); }); /** * Disables the password input field when the private post checkbox is checked. */ - $('#inline-edit .inline-edit-private input[value="private"]').click( function(){ + $('#inline-edit .inline-edit-private input[value="private"]').on( 'click', function(){ var pw = $('input.inline-edit-password-input'); if ( $(this).prop('checked') ) { pw.val('').prop('disabled', true); @@ -139,7 +139,7 @@ /** * Adds onclick events to the apply buttons. */ - $('#doaction, #doaction2').click(function(e){ + $('#doaction').on( 'click', function(e){ var n; t.whichBulkButtonId = $( this ).attr( 'id' ); @@ -215,7 +215,7 @@ * * @listens click */ - $('#bulk-titles a').click(function(){ + $('#bulk-titles a').on( 'click', function(){ var id = $(this).attr('id').substr(1); $('table.widefat input[value="' + id + '"]').prop('checked', false); @@ -329,6 +329,11 @@ textarea = $('textarea.tax_input_' + taxname, editRow), comma = wp.i18n._x( ',', 'tag delimiter' ).trim(); + // Ensure the textarea exists. + if ( ! textarea.length ) { + return; + } + terms.find( 'img' ).replaceWith( function() { return this.alt; } ); terms = terms.text(); @@ -378,7 +383,7 @@ } $(editRow).attr('id', 'edit-'+id).addClass('inline-editor').show(); - $('.ptitle', editRow).focus(); + $('.ptitle', editRow).trigger( 'focus' ); return false; }, @@ -420,7 +425,6 @@ $error = $errorNotice.find( '.error' ); $( 'table.widefat .spinner' ).removeClass( 'is-active' ); - $( '.ac_results' ).hide(); if (r) { if ( -1 !== r.indexOf( '