Skip to content

Fixed the hide password hint which is showing when the entry is focused #25768

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

Merged
merged 7 commits into from
Apr 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue17105.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System;
using Microsoft.Maui.Controls;

namespace Maui.Controls.Sample.Issues;

[Issue(IssueTracker.Github, 17105, "Hide password hint which is showing when the entry is focused", PlatformAffected.macOS)]
public class Issue17105 : ContentPage
{
public Issue17105()
{
var stackLayout = new StackLayout
{
Padding = new Thickness(30, 0),
Spacing = 25
};

var entry = new Entry
{
HorizontalOptions = LayoutOptions.Fill,
Placeholder = "Password: testing_password",
IsPassword = true,
AutomationId = "Entry"
};

stackLayout.Children.Add(entry);
Content = stackLayout;
}

}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#if MACCATALYST
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

namespace Microsoft.Maui.TestCases.Tests.Issues;

public class Issue17105 : _IssuesUITest
{
public Issue17105(TestDevice testDevice) : base(testDevice)
{
}

public override string Issue => "Hide password hint which is showing when the entry is focused";

[Test]
[Category(UITestCategories.Entry)]
public void HidePasswordHint()
{
App.WaitForElement("Entry");
App.Tap("Entry");
VerifyScreenshot();
}
}
#endif
3 changes: 3 additions & 0 deletions src/Core/src/Platform/iOS/TextFieldExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public static void UpdateIsPassword(this UITextField textField, IEntry entry)
}
else
textField.SecureTextEntry = entry.IsPassword;
#if MACCATALYST
textField.TextContentType = UITextContentType.OneTimeCode;
#endif
}

public static void UpdateHorizontalTextAlignment(this UITextField textField, ITextAlignment textAlignment)
Expand Down
Loading