-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fixed the hide password hint which is showing when the entry is focused #25768
base: main
Are you sure you want to change the base?
Fixed the hide password hint which is showing when the entry is focused #25768
Conversation
fix added
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
@@ -32,6 +32,8 @@ public static void UpdateIsPassword(this UITextField textField, IEntry entry) | |||
} | |||
else | |||
textField.SecureTextEntry = entry.IsPassword; | |||
|
|||
textField.TextContentType = UITextContentType.OneTimeCode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could include an UITest verifying the behavior after merge #25710
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will follow this PR, and once it’s merged, I’ll write a UI test case to verify the behavior.
@@ -32,6 +32,8 @@ public static void UpdateIsPassword(this UITextField textField, IEntry entry) | |||
} | |||
else | |||
textField.SecureTextEntry = entry.IsPassword; | |||
|
|||
textField.TextContentType = UITextContentType.OneTimeCode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use a compilation directive to only apply this change on Catalyst?
Also, It is outside the scope of PR, but it would be interesting to create a Catalyst specific Platform Specific allowing to set the https://developer.apple.com/documentation/swiftui/view/textcontenttype(_:)-ufdv (password, emailAddress etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since TextFieldExtensions.cs is already platform-specific to iOS, I have confirmed that the mentioned issue is reproducible on both iOS and Mac Catalyst. Therefore, this change will not impact other platforms.
Root cause
Description of Change
It prioritizes the detection of one-time codes, which can affect the display of password hints. This is because the system recognizes the field as intended for a one-time code rather than a password, and thus, it doesn’t show password suggestions.
Issues Fixed
Fixes #17105
Tested the behaviour in the following platforms
Output Screenshots
17105_macOS_BeforeChanges.mov
17105_macOs_AfterChanges.mov