xmartlabs / Eureka

Elegant iOS form builder in Swift
https://eurekacommunity.github.io
MIT License
11.78k stars 1.33k forks source link

Fix Chinese input issue #2150

Closed azone closed 3 years ago

azone commented 3 years ago

do nothing if the text field has markedTextRange

mats-claassen commented 3 years ago

Please explain the issue, ideally with code to reproduce and state versions of Eureka, Xcode, iOS

azone commented 3 years ago

If there is no marked text, the value of the property is nil. Marked text is provisionally inserted text that requires user confirmation; it occurs in multistage text input. The current selection, which can be a caret or an extended range, always occurs within the marked text. (https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange)

You should not do anything during the marked text presents.

If you want to reproduce it, just run the demo, and do the following steps:

  1. input any Chinese characters and confirm the marked text
  2. input Chinese characters again

After those two steps, you'll found that you can't input anymore, or very weird.