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