I have a simple screen with 2 TextBox elements and one Button . The Button event handler starts with the following lines:
private async void ForgotButton_Click(object sender, RoutedEventArgs e) { (sender as Button).IsEnabled = false; The problem is that when you click on the button, the first TextBox automatically gets focus on itself, the on-screen keyboard pops up, the cursor flashes. I do not understand why this is happening, because I did not click on it.
By the method of " scientific spear " it was established that it is because of this line that the problem appears.
Here is a small demonstration of what is happening on the screen: 