Skip to content

Commit

Permalink
fix(PasswordBox): Do not blur if PasswordBox not focused (#1530)
Browse files Browse the repository at this point in the history
Ensure that the blur command, which works by focusing on the current window Frame, does not execute if the PasswordBox does not currently have focus.
  • Loading branch information
rozele authored Nov 17, 2017
1 parent 18a84c7 commit 7bdf9f9
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,11 @@ public override void ReceiveCommand(PasswordBox view, int commandId, JArray args
}
else if (commandId == ReactTextInputManager.BlurTextInput)
{
var frame = Window.Current?.Content as Frame;
frame?.Focus(FocusState.Programmatic);
if (FocusManager.GetFocusedElement() == view)
{
var frame = Window.Current?.Content as Frame;
frame?.Focus(FocusState.Programmatic);
}
}
}

Expand Down

0 comments on commit 7bdf9f9

Please sign in to comment.