Advanced version of #382.
When user wants to remove a tag from image, there is no point in suggesting tags image does not already have. Neither is any point in server-side autocompletion.
Doing ac this way helps when removing obscure tags that currently require server-side autocomplete, which will have additional benefits of (slightly) lower server load and reduced latency for user.
Bonus points for doing it in a way that would allow bulk tag editor suggest all tags that are present only at least on one image. I imagine input.parentElement.querySelectorAll("span.tag") or input.parentElement.querySelector(":scope > span.tag") would be an option here.
Advanced version of #382.
When user wants to remove a tag from image, there is no point in suggesting tags image does not already have. Neither is any point in server-side autocompletion.
Doing ac this way helps when removing obscure tags that currently require server-side autocomplete, which will have additional benefits of (slightly) lower server load and reduced latency for user.
Bonus points for doing it in a way that would allow bulk tag editor suggest all tags that are present only at least on one image. I imagine
input.parentElement.querySelectorAll("span.tag")orinput.parentElement.querySelector(":scope > span.tag")would be an option here.