Make WordPress Core

Ticket #40242: 40242.2.diff

File 40242.2.diff, 1.2 KB (added by afercia, 7 years ago)
  • src/wp-admin/js/inline-edit-post.js

     
    115115                // enable autocomplete for tags
    116116                if ( 'post' === type ) {
    117117                        $( 'tr.inline-editor textarea[data-wp-taxonomy]' ).each( function ( i, element ) {
     118                                /*
     119                                 * While Quick Edit clones the form each time, Bulk Edit always re-uses
     120                                 * the same form. Let's check if an autocomplete instance already exists.
     121                                 */
     122                                if ( $( element ).autocomplete( 'instance' ) ) {
     123                                        // jQuery equivalent of `continue` within an `each()` loop.
     124                                        return;
     125                                }
     126
    118127                                $( element ).wpTagsSuggest();
    119128                        } );
    120129                }
  • src/wp-admin/js/tags-suggest.js

     
    120120                        },
    121121                        minLength: 2,
    122122                        position: {
    123                                 my: 'left top+2'
     123                                my: 'left top+2',
     124                                at: 'left bottom',
     125                                collision: 'none'
    124126                        },
    125127                        messages: {
    126128                                noResults: window.uiAutocompleteL10n.noResults,