[wp-trac] [WordPress Trac] #40242: Bulk edit tag autocomplete layout error
WordPress Trac
noreply at wordpress.org
Sat Mar 25 11:12:23 UTC 2017
#40242: Bulk edit tag autocomplete layout error
----------------------------------------------+----------------------------
Reporter: davidbenton | Owner: afercia
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.7.4
Component: Quick/Bulk Edit | Version: 4.7
Severity: normal | Resolution:
Keywords: has-screenshots has-patch commit | Focuses: ui,
| javascript
----------------------------------------------+----------------------------
Comment (by afercia):
Replying to [comment:10 davidbenton]:
> Almost sounds like it may be a jQuery UI issue, or do you think Bulk
Edit is using it in an unusual way?
Maybe a mix of both :) Yes, autocomplete here is used in a particular way.
While Quick Edit uses each time a new fresh autocomplete instance, Bulk
Edit re-uses the same instance.
On the other hand what autocomplete does
[https://core.trac.wordpress.org/browser/trunk/src/wp-
includes/js/jquery/ui/autocomplete.js?rev=31716#L514 when the suggestions
get displayed] doesn't work for some edge cases. It seems to me it defeats
the purpose of extending the defaults with the passed options, since the
default `position` object there is incomplete (there's just the `of`
property). This could be confusing for developers because when using
`.extend()` we should safely assume there are always some proper defaults,
even when using autocomplete in a particular way.
Maybe worth considering to check if an autocomplete widget instance
already exists and avoid calling again `wpTagsSuggest()` in that case. /cc
@azaozz
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40242#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list