Fixed bug where Enter read from hidden dropdown.
This commit is contained in:
@@ -990,7 +990,8 @@ class DirectoryDropdown {
|
|||||||
}
|
}
|
||||||
else if (e.key === "Enter") {
|
else if (e.key === "Enter") {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
const input = e.target
|
const input = e.target;
|
||||||
|
if (dropdown.style.display !== "none") {
|
||||||
const selection = options[iSelection];
|
const selection = options[iSelection];
|
||||||
if (selection !== undefined && selection !== null) {
|
if (selection !== undefined && selection !== null) {
|
||||||
DirectoryDropdown.selectionToInput(
|
DirectoryDropdown.selectionToInput(
|
||||||
@@ -1005,6 +1006,7 @@ class DirectoryDropdown {
|
|||||||
}
|
}
|
||||||
updateCallback();
|
updateCallback();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
await submitCallback();
|
await submitCallback();
|
||||||
input.blur();
|
input.blur();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user