UITextField clears all texts on insert when secureTextEntry is set to YES when there is already text
| Originator: | avedesk | ||
| Number: | rdar://25690848 | Date Originated: | 13-Apr-2016 12:16 AM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 9.3.1 |
| Classification: | Other Bug | Reproducible: | Always |
Summary: When setting secureTextEntry to YES (from NO) on a UITextField with text in it, the textfield will clear all text on the next insertion. This is probably some sort of intended behavior, but it makes having a "show / hide password" button hard to create. Steps to Reproduce: 1. Create a UITextField 2. type some text in it 3. set secureTextEntry = YES 4. type another character Expected Results: - The character is appended to the text already being there Actual Results: - The textfield is cleared and only the typed character in step 4 is visible. Regression: Notes: It seems that secureTextEntry always clears text on first insertion, which seems intended: the user probably cannot know what is in there, so it makes sense to clear. However, this also happens when dynamically setting secureTextEntry to YES on a textfield which already is first responder: that does not seem intended.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!