slackhq / SlackTextViewController

⛔️**DEPRECATED** ⛔️ A drop-in UIViewController subclass with a growing text input view and other useful messaging features
https://slack.com/
MIT License
8.32k stars 1.08k forks source link

Autocomplete Issue with foreign keyboards (Korean) #398

Closed TosinAF closed 8 years ago

TosinAF commented 8 years ago

Using / when typing in Korean on iOS forces letters to separate and not combine as they should (and this works as intended in other apps on iOS)

User Comment

In iPhone client, using Korean slash command is not available. When i type the first key of the command like “ㅇ” of “어디”, because of the autocompletion, cursor goes to next so i cannot type “어”. It make me type like “ㅇㅓ”. In Korean, two or three keys can be a one letter. We combine “ㅇ” and “ㅓ” to make “어”. The only way to use “/어디” is typing “ㅇ” and find “어디” in autocompletion list and choose it. Thank you :D

screen shot 2016-02-18 at 9 46 50 am
dzenbot commented 8 years ago

That reminds me of https://github.com/slackhq/SlackTextViewController/blob/30f3ecc9926b08443f4a61d47f30a23d0f8d0aac/Source/SLKTextViewController.m#L1167-L1171 It's probably a thing for most east asian languages. Will dig in soon.

TosinAF commented 8 years ago

Could probably do the same thing for now and maybe focus on when we start to localize.

dzenbot commented 8 years ago

Yup. Although, this isn't really a localisation issue. More like an race condition by all the little hacks we do to disable the auto-correction for auto-completion, in east asian languages.

dzenbot commented 8 years ago

Closing this for now.

intoxicated commented 7 years ago

@dzenbot which part of code should I look to fix this problem? any ideas?

intoxicated commented 7 years ago

@TosinAF @dzenbot Actually it wasn't problem with SLK in my case. I looked into every single method in SLK when autocompletion worked. And this didn't happened when didChangeAutoCompletionPrefix:word didn't get called which leaded me to my own source code where I overrided this method. So when this method was called, I originally did filtering/sorting stuffs to display autocompletion in main thread, and I gave a shot to run this on background since I doubted maybe these work load might cause to textview not display text correctly. I simply used GCD to do sorting/filtering work and called showAutoCompletionView: in main thread, and it worked as I expected!