-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with UITextField secureTextEntry = YES #779
Comments
FWIW I tried explicitly setting |
Are you saying the text field is always being cleared on focus, even with If you'd like a signal that captures the event that clears the field, you could create your own signal based on |
Not on focus, but on the first keypress after gaining focus. When this happens I get into a weird state, as if the change didn't register. I'll give your suggestion a try and report back. |
I tried this and it seems that no event is fired when the field is cleared in this way. |
The behavior I'm seeing is described in this StackOverflow question. |
I believe that this event not being triggered is a bug with the iOS SDK I'm targeting so I filed a Radar. |
Thanks for the follow up. I'll close this issue. |
For reference: rdar://14904641 |
This issue was fixed in one of the betas after I filed the radar. |
I hope this is the right forum for this type of question. If not I can post to StackOverflow instead.
I'm using v2.0-RC-2 and have set up a view controller, view model and a view which contains several text fields.
The current setup is similar to an example from the documentation where the submit button is enabled when the view model is valid (currently when all properties have
length > 0
).Everything works well except for when I set
secureTextEntry = YES
on a text field. If that field already has text entered (either pre-populated by the view model, or entered by the user), I'm able to focus on the field and clear the text without the button being disabled.I believe this is to do with the unique behavior of a text field with
secureTextEntry = YES
which clears the entire field on the first keypress (not just "delete") after gaining focus.If I type something and then delete it again, since I'm already focused I must delete each character individually and the button is disabled as expected.
I'm assuming this is something to do with the
UITextFieldTextDid...
notifications so not sure if a change to RAC can address this, but would appreciate any help in finding a workaround if not.Thanks.
The text was updated successfully, but these errors were encountered: