UITextField with SecureEntry sometimes highlights yellow color with "Strong Password" text, and then the keyboard gets stuck
I haven't able to identify why this issue occurs, Sometimes I am facing this issue when I start typing in UITextField then get a yellow color background with a "Strong Password" text on the right side, and something cut off on the left. I can still tap the UITextField and "Type" but the value does not change within the TextField.
I am using xCode 11.6 and facing this issue with iOS 13.6 simulator.
As I've discovered this issue while developing a
React Native
app, I thought it was a bug on theJavaScript
level. But it turned out this is an issue on theiOS
level.As far as I have searched, I don't think that there's currently a fix for this bug, but there is a workaround. As stated in this comment: all you have to do is change the
textContentType
property of theUITextField
tooneTimeCode
.You can do it through Xcode, by selecting the
UITextField
, then switching over to the attributes inspector and selecting theContent Type
property to beOne Time Code
:Or directly through code.
Swift:
Objective C: