Skip to content

Commit

Permalink
fix(Studio): Not being able to close fully disabled popup-menu
Browse files Browse the repository at this point in the history
  • Loading branch information
psyGamer committed Oct 27, 2024
1 parent 526fccd commit 81f6ff4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Studio/CelesteStudio/Editing/PopupMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ public bool HandleKeyDown(KeyEventArgs e, bool useTabComplete) {
if (!Visible) {
return false;
}

if (e.Key == Keys.Escape) {
Visible = false;
return true;
}

// Don't consume inputs if nothing is interactable
if (shownEntries.All(entry => entry.Disabled)) {
Expand All @@ -318,10 +323,6 @@ public bool HandleKeyDown(KeyEventArgs e, bool useTabComplete) {
}
return true;
}
if (e.Key == Keys.Escape) {
Visible = false;
return true;
}

return false;
}
Expand Down

0 comments on commit 81f6ff4

Please sign in to comment.