Skip to content

Commit

Permalink
fix: Avoid setting intial PasswordRevealState for plain TextBox
Browse files Browse the repository at this point in the history
(cherry picked from commit a49023f)
  • Loading branch information
MartinZikmund authored and mergify[bot] committed Mar 13, 2023
1 parent 67b126d commit 9344aed
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public void StartEntry()

_textBoxView!.AddToTextInputLayer(xamlRoot);
InvalidateLayout();

SetPasswordRevealState(_currentPasswordRevealState);

_textBoxView.SetFocus();
Expand Down Expand Up @@ -164,8 +165,11 @@ public void UpdatePosition()

public void SetPasswordRevealState(PasswordRevealState revealState)
{
_textBoxView?.SetPasswordRevealState(revealState);
_currentPasswordRevealState = revealState;
if (_owner.TextBox is PasswordBox)
{
_textBoxView?.SetPasswordRevealState(revealState);
_currentPasswordRevealState = revealState;
}
}

public void Select(int start, int length)
Expand Down

0 comments on commit 9344aed

Please sign in to comment.