Bug: Enter disabled when hidden dropdown

This commit is contained in:
Christian Bastian
2024-01-25 03:35:06 -05:00
parent dd6084ad6d
commit 1daf03e856

View File

@@ -975,6 +975,7 @@ class ModelManager extends ComfyDialog {
$: (el) => (this.#el.modelContentFilter = el),
placeholder: "example: /0/1.5/styles/clothing -.pt",
onkeydown: (e) => {
if (searchDropdown.style.display === "none") { return; }
const children = searchDropdown.children;
let iChild;
for (iChild = 0; iChild < children.length; iChild++) {
@@ -1006,7 +1007,7 @@ class ModelManager extends ComfyDialog {
this.#modelUpdateFilterDropdown();
}
this.#modelGridUpdate();
searchDropdown.style.display = "none";
e.target.blur();
}
else if (e.key === "ArrowDown" || e.key === "ArrowUp") {
e.stopPropagation();