vue-tags-input
vue-tags-input copied to clipboard
mouse click on suggestion, focus lost
Can't reproduce it on your demo, but in my app if I select a suggestion with the mouse vue-tags-input losses focus (focused: false in component data) although I see it focused and I can continue to type. Typing next tag don't show suggestions anymore until I focus out and back in. Selecting with keyboard works fine.
quick debugging showed this.$el.contains(e.target) => false. It looks dropdown closes before check is done
blurred(e) { // if the click occurs on tagsinput → don't hide if (this.$el.contains(e.target)) return;
Same problem :(
To use this component anyway, as a quick fix I used :autocomplete-always-open="true" with manual items filtering (hiding items when tag property is empty) + some css tricks.
Waiting bugfix to remove this hack...
Maybe #89 fixes this issue
Unfortunately, #89 didn't solve it for me. I have the same problem, but the hack does not work in my case because I would like to show the autocomplete list when the component is focused even if the tag property is empty. However, I can't use the blur event to hide the autocomplete list because it is called before the tags-changed event making it so no item is selected on a mouse click, only the enter key works.