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. git-svn-id: https://develop.svn.wordpress.org/trunk@40357 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e4ab5c306d
commit
fb3e6ea250
@ -115,6 +115,15 @@ inlineEditPost = {
|
||||
// enable autocomplete for tags
|
||||
if ( 'post' === type ) {
|
||||
$( 'tr.inline-editor textarea[data-wp-taxonomy]' ).each( function ( i, element ) {
|
||||
/*
|
||||
* While Quick Edit clones the form each time, Bulk Edit always re-uses
|
||||
* the same form. Let's check if an autocomplete instance already exists.
|
||||
*/
|
||||
if ( $( element ).autocomplete( 'instance' ) ) {
|
||||
// jQuery equivalent of `continue` within an `each()` loop.
|
||||
return;
|
||||
}
|
||||
|
||||
$( element ).wpTagsSuggest();
|
||||
} );
|
||||
}
|
||||
|
@ -120,7 +120,9 @@
|
||||
},
|
||||
minLength: 2,
|
||||
position: {
|
||||
my: 'left top+2'
|
||||
my: 'left top+2',
|
||||
at: 'left bottom',
|
||||
collision: 'none'
|
||||
},
|
||||
messages: {
|
||||
noResults: window.uiAutocompleteL10n.noResults,
|
||||
|
Loading…
Reference in New Issue
Block a user