matiastucci / vue-input-tag

:bookmark: Vue.js 2.0 Input Tag Component
https://tucci.me/vue-input-tag
MIT License
536 stars 135 forks source link

Using keys to add tags that are different than tab and enter doesn't clear the tag's content #86

Closed oakdays closed 5 years ago

oakdays commented 5 years ago

Version of Vue I'm using?: 2.5.16 Version of vue-input-tag I'm using?: 1.0.6

Small JSFiddle showing the issue: https://jsfiddle.net/eywraw8t/409731/

Using keys to add tags that are different than 9 (tab) and 13 (enter) doesn't clear the tag's content, carrying it over + the pressed key instead.

Example for reproduction:

  1. Access the JSFiddle link above
  2. Enter anything and press enter. Tag is added. Same thing hapens when using tab. This is ok.
  3. Enter anything and press ,. While it works and a tag is added, you'll see the text of the added tag + a comma. For example, if you type 123 and then comma, a tag is added but the text 123, remains.
  4. You can try the same thing with the space key in the example since I added the 32 key to test as well. It doesn't work too.
jaggy commented 5 years ago

Opened a PR #87 which should fix this. 🙂

matiastucci commented 5 years ago

Merged and published a new version (1.0.7). Thanks everyone!