Skip to content

Commit

Permalink
Allow clicking on empty search header to close dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
smoogipoo committed Aug 9, 2024
1 parent 6478b89 commit dd6ad92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osu.Framework/Graphics/UserInterface/DropdownHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ private void updateState()
/// </summary>
private bool onClick(ClickEvent e)
{
// Allow input to fall through to the search bar (and its contained textbox) if it's visible.
if (SearchBar.State.Value == Visibility.Visible)
// Allow input to fall through to the search bar (and its contained textbox) if there's any search text.
if (SearchBar.State.Value == Visibility.Visible && !string.IsNullOrEmpty(SearchTerm.Value))
return false;

// Otherwise, the header acts as a button to show/hide the menu.
Expand Down

0 comments on commit dd6ad92

Please sign in to comment.