GrowingTextView icon indicating copy to clipboard operation
GrowingTextView copied to clipboard

输入问题

Open poholo opened this issue 4 years ago • 1 comments

中文输入,输入一段后,直接是字母录入,如图. 估计跟替换内容有关吧? IMG_0253

poholo avatar Aug 23 '21 04:08 poholo

Chinese IME (input method) like Pinyin(or any other IME need more than one type to input), use more than one type to input a single unicode character, for example type zi for ,but this View will break the input to "zzi字" by mistake, so he guessed it is maybe something wrong with some replace function.

My own guess is something wrong with the textViewDidChange function I added a log print in textViewDidChange print("\(textView.text)") here is what is showing in log on m1 macOS (hardware keyboard)

Optional("z")
Optional("zi")
Optional("字")
Optional("字")
Optional("字z")
Optional("字zzi")
Optional("字zzi字")

on iPhone with iOS 15.2 (soft keyboard)

Optional("z")
Optional("zi")
Optional("字")
Optional("字")
Optional("字z")
Optional("字zi")
Optional("字zii")

All input with keyboard is z i space z i space

ryh avatar Dec 25 '21 12:12 ryh