Make WordPress Core

Changeset 40357


Ignore:
Timestamp:
03/31/2017 04:34:52 PM (7 years ago)
Author:
afercia
Message:

Quick/Bulk Edit: Fix the Tag suggestions position on the Bulk Edit textarea.

Always passes the complete position object to the jQuery autocomplete widget.
Also checks if an autocomplete instance already exists on the Bulk Edit textarea.

Props davidbenton.
Fixes #40242.

Location:
trunk/src/wp-admin/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/inline-edit-post.js

    r39210 r40357  
    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            } );
  • trunk/src/wp-admin/js/tags-suggest.js

    r39281 r40357  
    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: {
Note: See TracChangeset for help on using the changeset viewer.