Added remove single for remove plugin by ChoppyThing · Pull Request #848 · selectize/selectize.js
Oook, I just found a fix that works for my case:
First, just copy paste the same append function from multiClose into singleClose. This fixes the not appearing "remove_button", making it render inside the "item" element, instead that as adjacent element!
I wonder what was the purpose of making that different from the append in multiClose.
Additionally, I changed the line 3716 in:
options.className = options.className || 'remove-single';
because I want the possibility to pass my custom classname, instead of being forced to the "remove-single" (in my case I actually don't care of the difference between 'multi' and 'single', when styling the remove button).
I also found that there was another pull-request with a more clear code:
1c62573
but actually I am not so good with GitHub to really understand what was the sequence of events, what was integrated and what wasn't, and why.
My changes fix the issue, but am not really sure why a different append function was being used in the first place, so I can't assume that my changes are correct.
Eventually I can create a pull request, but it should be reviewed to avoid it to break something else.