diff options
author | Crendgrim <Crendgrim@users.noreply.github.com> | 2024-06-11 16:41:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 15:41:47 +0100 |
commit | 65b4f7ba8374bbaebc6a431f8347ffc3e8afdced (patch) | |
tree | bf4f9ac4c48c417c186d9bade3ecdcfa38aaf83d | |
parent | f6257525daa7c36a6eccec53fc75041af1e347c6 (diff) | |
download | YetAnotherConfigLib-65b4f7ba8374bbaebc6a431f8347ffc3e8afdced.tar.gz YetAnotherConfigLib-65b4f7ba8374bbaebc6a431f8347ffc3e8afdced.tar.bz2 YetAnotherConfigLib-65b4f7ba8374bbaebc6a431f8347ffc3e8afdced.zip |
Fix dropdown controllers erroneously showing their dropdown (#183)
Whenever a text input followed a dropdown controller, the dropdown
controller would act on the key press and show its widget.
-rw-r--r-- | src/main/java/dev/isxander/yacl3/gui/controllers/dropdown/AbstractDropdownControllerElement.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/dev/isxander/yacl3/gui/controllers/dropdown/AbstractDropdownControllerElement.java b/src/main/java/dev/isxander/yacl3/gui/controllers/dropdown/AbstractDropdownControllerElement.java index 7e73332..cc56c11 100644 --- a/src/main/java/dev/isxander/yacl3/gui/controllers/dropdown/AbstractDropdownControllerElement.java +++ b/src/main/java/dev/isxander/yacl3/gui/controllers/dropdown/AbstractDropdownControllerElement.java @@ -104,6 +104,9 @@ public abstract class AbstractDropdownControllerElement<T, U> extends StringCont @Override public boolean charTyped(char chr, int modifiers) { + if (!inputFieldFocused) { + return false; + } if (!dropdownVisible) { createDropdownWidget(); } |