Changeset 49717
- Timestamp:
- 12/01/2020 07:30:16 AM (4 years ago)
- Location:
- branches/5.6
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.6
- Property svn:mergeinfo changed
/trunk merged: 49703,49710
- Property svn:mergeinfo changed
-
branches/5.6/src/js/_enqueues/admin/inline-edit-post.js
r49213 r49717 329 329 textarea = $('textarea.tax_input_' + taxname, editRow), 330 330 comma = wp.i18n._x( ',', 'tag delimiter' ).trim(); 331 332 // Ensure the textarea exists. 333 if ( ! textarea.length ) { 334 return; 335 } 331 336 332 337 terms.find( 'img' ).replaceWith( function() { return this.alt; } ); -
branches/5.6/src/js/_enqueues/admin/tags-suggest.js
r48650 r49717 38 38 var last; 39 39 var $element = $( this ); 40 41 // Do not initialize if the element doesn't exist. 42 if ( ! $element.length ) { 43 return this; 44 } 40 45 41 46 options = options || {}; … … 147 152 $element.on( 'keydown', function() { 148 153 $element.removeAttr( 'aria-activedescendant' ); 149 } ) 150 .autocomplete( options ) 151 .autocomplete( 'instance' )._renderItem = function( ul, item ) { 154 } ); 155 156 $element.autocomplete( options ); 157 158 // Ensure the autocomplete instance exists. 159 if ( ! $element.autocomplete( 'instance' ) ) { 160 return this; 161 } 162 163 $element.autocomplete( 'instance' )._renderItem = function( ul, item ) { 152 164 return $( '<li role="option" id="wp-tags-autocomplete-' + item.id + '">' ) 153 165 .text( item.name ) … … 169 181 $element.autocomplete( 'search' ); 170 182 } 171 } ) 183 } ); 184 172 185 // Returns a jQuery object containing the menu element. 173 .autocomplete( 'widget' )186 $element.autocomplete( 'widget' ) 174 187 .addClass( 'wp-tags-autocomplete' ) 175 188 .attr( 'role', 'listbox' )
Note: See TracChangeset
for help on using the changeset viewer.