Skip to content

Commit

Permalink
Fix keyboard not focusing on search bar of the tile spawn window on o…
Browse files Browse the repository at this point in the history
…pen (#5630)
  • Loading branch information
ShadowCommander authored Jan 29, 2025
1 parent acc7bf7 commit 5d77207
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ private void EnsureWindow()
return;
_window = UIManager.CreateWindow<TileSpawnWindow>();
LayoutContainer.SetAnchorPreset(_window,LayoutContainer.LayoutPreset.CenterLeft);
_window.SearchBar.GrabKeyboardFocus();
_window.ClearButton.OnPressed += OnTileClearPressed;
_window.SearchBar.OnTextChanged += OnTileSearchChanged;
_window.TileList.OnItemSelected += OnTileItemSelected;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@ public TileSpawnWindow()
{
RobustXamlLoader.Load(this);
}

protected override void Opened()
{
base.Opened();

SearchBar.GrabKeyboardFocus();
}
}

0 comments on commit 5d77207

Please sign in to comment.