splitwise / TokenAutoComplete

Gmail style MultiAutoCompleteTextView for Android
Apache License 2.0
1.3k stars 383 forks source link

Extra comma is left when the last token is removed #85

Closed AlexNab closed 9 years ago

AlexNab commented 9 years ago

Hi, first of all I would like to say thanks for your great component. :-)

There is a small glitch with extra comma left when the last tag was removed. How to reproduce:

  1. type several tags, e.g. 123, 456, 789 will give us 123 456 789
  2. remove each one of them
  3. text field will not be empty as expected, but with a comma character left.
premnirmal commented 9 years ago

I'm experiencing this issue too. Has anybody found a fix for this?

premnirmal commented 9 years ago

I managed to fix this by doing this: https://github.com/fuzz-productions/TokenAutoComplete/commit/cf933766f5e8f636c89c3e97a7f3ae09d1553328

It hasn't seemed to have broken anything yet

vit001 commented 9 years ago

I can confirm this issue. The fix from @premnirmal doesn't work for me - yields various crashes,

mgod commented 9 years ago

@vit001 I'm not able to reproduce the issue using the sample project. Are you able to get it to happen on a particular device/simulator/android version? I'm guessing this is extremely specific - like only happening on Samsung Galaxy Notes running 4.4.4 or something

vit001 commented 9 years ago

It is happening for me on Samsung Galaxy S3 running Lollipop (Liquid Smooth ROM). I will try on simulator ...

vit001 commented 9 years ago

I do not see this issue on my device with your sample project. Will investigate ...

vit001 commented 9 years ago

@mgod - Confirmed that the issue happens in your sample app when the prefix is empty. When the prefix is non-empty the issue doesn't happen.

mgod commented 9 years ago

Awesome! I'm able to reproduce this now. As a quick fix, you can set the prefix to " ", though this tweaks the layout in an annoying way

vit001 commented 9 years ago

Thanks!