Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 10 TextField password (secure) freezes when text too long

I stumbled upon an interesting behaviour after upgrading to iOS 10. It seems that when password is too long - the app freezes when font of the text field is bigger than "min font size" and "adjust to fit" is checked. The app freezes when I try to input more characters than fit into input width. iOS <10 don't have this problem.

Sample Storyboard:

enter image description here

Text field settings: in red - the changes from default values, in orange - difference between two text fields that prevents freezing.

enter image description here

I am not sure why this is happening, and while I managed to solve it by unchecking the "adjust to fit" I would appreciate if anyone can explain why is this happening. Maybe it is a requirements that font should be <= "min font size"? I haven't found any info on that.

Thanks!

Sample repo: https://github.com/sQu1rr/test-ios-freezing-password

like image 722
Aleksandr Belkin Avatar asked Oct 03 '16 09:10

Aleksandr Belkin


2 Answers

There's a bug in iOS 10.0.2... https://openradar.appspot.com/28590124

like image 115
Peng90 Avatar answered Oct 21 '22 09:10

Peng90


Unchecking "Adjust to fit" from textfield will solve the problem. But its just a workaround as this is a known bug pointed out by @peng90.

like image 38
Masood Avatar answered Oct 21 '22 08:10

Masood