Skip to content

Commit 07c7c6f

Browse files
committed
searchbox: fix issue with text selected, not getting replaced with new text
1 parent b0da1bf commit 07c7c6f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

UnityLauncherPro/MainWindow.xaml.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,10 +1189,9 @@ private void OnWindowKeyDown(object sender, KeyEventArgs e)
11891189
if (Keyboard.Modifiers == ModifierKeys.Control) return;
11901190

11911191
// activate searchbar if not active and we are in tab#1
1192-
if (searchBoxProjects.IsFocused == false)
1192+
if (searchBoxProjects.IsKeyboardFocusWithin == false)
11931193
{
11941194
searchBoxProjects.Focus();
1195-
//searchBoxProjects.sele(searchBoxProjects.SearchText.Length, 0);
11961195
}
11971196
break;
11981197
}
@@ -1209,10 +1208,9 @@ private void OnWindowKeyDown(object sender, KeyEventArgs e)
12091208
searchBoxUnitys.SearchText = "";
12101209
break;
12111210
default:
1212-
if (searchBoxUnitys.IsFocused == false)
1211+
if (searchBoxUnitys.IsKeyboardFocusWithin == false)
12131212
{
12141213
searchBoxUnitys.Focus();
1215-
//txtSearchBoxUnity.Select(txtSearchBoxUnity.Text.Length, 0);
12161214
}
12171215
break;
12181216
}

0 commit comments

Comments
 (0)