Skip to content

Commit 9344aed

Browse files
MartinZikmundmergify[bot]
authored andcommitted
fix: Avoid setting intial PasswordRevealState for plain TextBox
(cherry picked from commit a49023f)
1 parent 67b126d commit 9344aed

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Uno.UI/UI/Xaml/Controls/TextBox/OverlayTextBoxView/OverlayTextBoxViewExtension.skia.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public void StartEntry()
5252

5353
_textBoxView!.AddToTextInputLayer(xamlRoot);
5454
InvalidateLayout();
55+
5556
SetPasswordRevealState(_currentPasswordRevealState);
5657

5758
_textBoxView.SetFocus();
@@ -164,8 +165,11 @@ public void UpdatePosition()
164165

165166
public void SetPasswordRevealState(PasswordRevealState revealState)
166167
{
167-
_textBoxView?.SetPasswordRevealState(revealState);
168-
_currentPasswordRevealState = revealState;
168+
if (_owner.TextBox is PasswordBox)
169+
{
170+
_textBoxView?.SetPasswordRevealState(revealState);
171+
_currentPasswordRevealState = revealState;
172+
}
169173
}
170174

171175
public void Select(int start, int length)

0 commit comments

Comments
 (0)