splitwise / TokenAutoComplete

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

last token is deleted when SwiftKey keyboard is used #354

Closed kamendo closed 5 years ago

kamendo commented 6 years ago

Here is a video https://drive.google.com/file/d/1ueGIkvXTpe1HH0e0Ym9uCbve8HZOIGdI/view?usp=sharing

Looks like for some reason the IME calls deleteSurroundingText when moving the focus to the next field. This does not happen with default keyboard. Any ideas?

mgod commented 6 years ago

Maybe file a bug with SwiftKey? I'll take a look, but the fundamental issue here is probably going to wind up being that The library can't tell the difference between an intentional user edit we should respond to and SwiftKey being "helpful".

It might also be possible to set some parameters on the field that tells SwiftKey to stop being helpful. If you figure out settings on the view that make SwiftKey stop helping so much, please let me know. I've tried to enable all of the correct settings to tell keyboards not to do more than input text, but keyboard compliance with those settings is pretty spotty.

mgod commented 5 years ago

I have been able to reproduce this. The issue is that SwiftKey automatically adds a space after punctuation marks to help the user. To avoid having extra spaces at the end of sentences, it clears any remaining space when the view loses focus. 3.0.0-alpha should resolve this, though it's still pretty unstable.