manishkkatoch / SimpleTwoWayBindingIOS

An ultra light, ultra simple two way binding library for IOS and Swift.
MIT License
165 stars 48 forks source link

Work around UIKit which jumped cursors to the end of text view & fields #16

Closed fweez closed 4 years ago

fweez commented 4 years ago

See https://github.com/manishkkatoch/SimpleTwoWayBindingIOS/issues/15 for an explanation and a repro.

This patch simply checks that the control's text is different from the value coming in from the binding, and only sets it if they are different. My testing has shown this corrects the bug in UITextView and UITextField with double-width characters.

I bumped the version so the Podfile for our app, which is temporarily pointing at my fork, will pick up these changes.