WordPress.org

Make WordPress Core

Changeset 40365


Ignore:
Timestamp:
04/03/17 21:55:50 (4 months ago)
Author:
swissspidy
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.

Merges [40357] to the 4.7 branch.

Location:
branches/4.7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-admin/js/inline-edit-post.js

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

    r39281 r40365  
    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.