diff options
Diffstat (limited to 'src/app/js')
-rw-r--r-- | src/app/js/navigate.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/app/js/navigate.js b/src/app/js/navigate.js index b5b98a6..9b99df6 100644 --- a/src/app/js/navigate.js +++ b/src/app/js/navigate.js @@ -523,19 +523,24 @@ navigate.select = () => { // focused, which isn't great // // so we make the main process send a fake Enter key press - if (active.closest("select")) { - active = active.closest("select"); + if (active.closest("select") || active.querySelector("select")) { + // make sure this element doesn't get unselected + navigate.dont_unselect = active; + + active = active.closest("select") || active.querySelector("select"); // make sure `<select>` is focused active.focus(); active.click(); - // make sure this element doesn't get unselected - navigate.dont_unselect = active; - // send fake Enter key to open selection menu ipcRenderer.send("send-enter-key"); + // make sure element is unselected + active.addEventListener("change", () => { + active.blur(); + }, { once: true }) + return; } |