mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-14 01:24:09 +00:00
Closed unfocused search bar on escape (again)
This commit is contained in:
1 parent
49a5159810
commit
fad17fa3bd
1 file changed
+5
-5
@@ -899,6 +899,11 @@ public class SearchReplaceBar {
|
||||
* @return true if input was consumed
|
||||
*/
|
||||
public boolean keyTyped(char c, int keyCode) {
|
||||
if (keyCode == Keyboard.KEY_ESCAPE && visible) {
|
||||
close();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!visible || (!searchFieldFocused && !replaceFieldFocused)) return false;
|
||||
|
||||
// Check modifier keys - don't let them trigger first-match issue
|
||||
@@ -913,11 +918,6 @@ public class SearchReplaceBar {
|
||||
return true; // Consume but don't process
|
||||
}
|
||||
|
||||
if (keyCode == Keyboard.KEY_ESCAPE) {
|
||||
close();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (keyCode == Keyboard.KEY_TAB && showReplace) {
|
||||
searchFieldFocused = !searchFieldFocused;
|
||||
replaceFieldFocused = !replaceFieldFocused;
|
||||
|
||||
Reference in new issue
Block a user