vue-tags-input icon indicating copy to clipboard operation
vue-tags-input copied to clipboard

mouse click on suggestion, focus lost

Open xrado opened this issue 6 years ago • 4 comments
trafficstars

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.

xrado avatar Mar 18 '19 12:03 xrado

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;

xrado avatar Mar 18 '19 12:03 xrado

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...

pravdinalex avatar Apr 17 '19 09:04 pravdinalex

Maybe #89 fixes this issue

JohMun avatar Jun 30 '19 11:06 JohMun

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.

pedroig avatar Jul 11 '19 14:07 pedroig