mbenford / ngTagsInput

Tags input directive for AngularJS
http://mbenford.github.io/ngTagsInput
MIT License
1.64k stars 541 forks source link

Single letter tags are not selectable #838

Open ShurikAg opened 6 years ago

ShurikAg commented 6 years ago

I was 100% sure that there is an issue with my code, but then I reproduced it on one of the demos. This one: "Tags input with custom styling for individual autocomplete matches" on this page: http://mbenford.github.io/ngTagsInput/demos

If you update tags.json to have some tag names with a single letter names and allow to load on focus & on empty, the list of tags is opened as autocomplete. However, if you try selecting one of the single letter tags, they are not getting added. Instead the input field gets invalid-tag class. See screenshot: https://pasteboard.co/GX1znYs.png

rognstad commented 6 years ago

The default min-length for tags-input is 3, so items shorter than that can't be selected.

It would probably be good to avoid min-length checking on tags-input if options are chosen from auto-complete.