Skip to content

Commit affba1d

Browse files
devanathan-vaithiyanathanDhivya-SF4094
authored andcommitted
Fixed the hide password hint which is showing when the entry is focused (dotnet#25768)
* Update TextFieldExtensions.cs fix added * Revert "Fixed CollectionViewHandler2 null reference exception if ItemsLayout is set for Tablet but not on mobile devices (dotnet#26152)" This reverts commit 0ddc794. * Reapply "Fixed CollectionViewHandler2 null reference exception if ItemsLayout is set for Tablet but not on mobile devices (dotnet#26152)" This reverts commit 4b9074c. * Moved fix to platform specific for macOS * Updated Screenshot for mac --------- Co-authored-by: Dhivya-SF4094 <[email protected]>
1 parent 2a74276 commit affba1d

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using System;
2+
using Microsoft.Maui.Controls;
3+
4+
namespace Maui.Controls.Sample.Issues;
5+
6+
[Issue(IssueTracker.Github, 17105, "Hide password hint which is showing when the entry is focused", PlatformAffected.macOS)]
7+
public class Issue17105 : ContentPage
8+
{
9+
public Issue17105()
10+
{
11+
var stackLayout = new StackLayout
12+
{
13+
Padding = new Thickness(30, 0),
14+
Spacing = 25
15+
};
16+
17+
var entry = new Entry
18+
{
19+
HorizontalOptions = LayoutOptions.Fill,
20+
Placeholder = "Password: testing_password",
21+
IsPassword = true,
22+
AutomationId = "Entry"
23+
};
24+
25+
stackLayout.Children.Add(entry);
26+
Content = stackLayout;
27+
}
28+
29+
}
44.8 KB
Loading
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#if MACCATALYST
2+
using NUnit.Framework;
3+
using UITest.Appium;
4+
using UITest.Core;
5+
6+
namespace Microsoft.Maui.TestCases.Tests.Issues;
7+
8+
public class Issue17105 : _IssuesUITest
9+
{
10+
public Issue17105(TestDevice testDevice) : base(testDevice)
11+
{
12+
}
13+
14+
public override string Issue => "Hide password hint which is showing when the entry is focused";
15+
16+
[Test]
17+
[Category(UITestCategories.Entry)]
18+
public void HidePasswordHint()
19+
{
20+
App.WaitForElement("Entry");
21+
App.Tap("Entry");
22+
VerifyScreenshot();
23+
}
24+
}
25+
#endif

src/Core/src/Platform/iOS/TextFieldExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ public static void UpdateIsPassword(this UITextField textField, IEntry entry)
3232
}
3333
else
3434
textField.SecureTextEntry = entry.IsPassword;
35+
#if MACCATALYST
36+
textField.TextContentType = UITextContentType.OneTimeCode;
37+
#endif
3538
}
3639

3740
public static void UpdateHorizontalTextAlignment(this UITextField textField, ITextAlignment textAlignment)

0 commit comments

Comments
 (0)