[wp-trac] [WordPress Trac] #21258: Autosuggest for tags suggests tag already chosen
WordPress Trac
noreply at wordpress.org
Fri Jun 16 22:21:50 UTC 2017
#21258: Autosuggest for tags suggests tag already chosen
---------------------------------+-----------------------------------------
Reporter: roytanck | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: has-patch needs- | Focuses: javascript, administration
testing |
---------------------------------+-----------------------------------------
Changes (by luistinygod):
* keywords: needs-patch => has-patch needs-testing
Comment:
I discussed the fix with @adamsilverstein during WCEU contributor day.
Our first approach was to check if the added tags were already available
as an object at `wp` but we couldn't find it.
As it is just a small fix in a very specific context, I opted to just
check the DOM each time we need to filter the set of terms we receive from
the server against the ones already added to the post, instead of going to
a more pretty solution of having the added tags available as an object,
which would need much more logic to maintain it in sync with the DOM
(maybe at /wp-admin/js/tags-box.js).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21258#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list