Ticket #51872: 51872.diff
File 51872.diff, 1.8 KB (added by , 5 years ago) |
---|
-
src/js/_enqueues/admin/inline-edit-post.js
329 329 textarea = $('textarea.tax_input_' + taxname, editRow), 330 330 comma = wp.i18n._x( ',', 'tag delimiter' ).trim(); 331 331 332 // Ensure the textarea exists. 333 if ( ! textarea.length ) { 334 return; 335 } 336 332 337 terms.find( 'img' ).replaceWith( function() { return this.alt; } ); 333 338 terms = terms.text(); 334 339 -
src/js/_enqueues/admin/tags-suggest.js
38 38 var last; 39 39 var $element = $( this ); 40 40 41 // Do not initialize if the element doesn't exist. 42 if ( ! $element.length ) { 43 return; 44 } 45 41 46 options = options || {}; 42 47 43 48 var taxonomy = options.taxonomy || $element.attr( 'data-wp-taxonomy' ) || 'post_tag'; … … 146 151 147 152 $element.on( 'keydown', function() { 148 153 $element.removeAttr( 'aria-activedescendant' ); 149 } ) 150 .autocomplete( options ) 151 .autocomplete( 'instance' )._renderItem = function( ul, item ) { 152 return $( '<li role="option" id="wp-tags-autocomplete-' + item.id + '">' ) 153 .text( item.name ) 154 .appendTo( ul ); 155 }; 154 } ); 156 155 156 $element.autocomplete( options ); 157 158 // Ensure the autocomplete instance exists. 159 if ( $element.autocomplete( 'instance' ) ) { 160 $element.autocomplete( 'instance' )._renderItem = function( ul, item ) { 161 return $( '<li role="option" id="wp-tags-autocomplete-' + item.id + '">' ) 162 .text( item.name ) 163 .appendTo( ul ); 164 }; 165 } 166 157 167 $element.attr( { 158 168 'role': 'combobox', 159 169 'aria-autocomplete': 'list',