Fixed ESC not closing searchBar/goToDialog when they are visible but not focused

This commit is contained in:
bigguy345 committed 2025-12-20 11:59:34 +02:00
1 parent db0e7da834
commit a91039c026
3 files changed
+14 -19

No files matched your search

@@ -867,18 +867,12 @@ public class GuiScriptTextArea extends GuiNpcTextField {
KEYS_OVERLAY.keyTyped(c, i);
// Handle Go To Line dialog input first if it has focus
if (goToLineDialog.hasFocus()) {
if (goToLineDialog.keyTyped(c, i)) {
if (goToLineDialog.isVisible() &&goToLineDialog.keyTyped(c, i))
return true;
}
}
// Handle search bar input first if it has focus
if (searchBar.hasFocus()) {
if (searchBar.keyTyped(c, i)) {
return true;
}
}
if (searchBar.isVisible() && searchBar.keyTyped(c, i))
return true;
if (!active || KEYS_OVERLAY.showOverlay) return false;