diff options
author | 0neGal <mail@0negal.com> | 2024-12-20 22:26:38 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2024-12-20 22:26:38 +0100 |
commit | 2ab6eb9eed73bee67ccc0c03d8588fd77358bbf5 (patch) | |
tree | 693fe4e8c6ce026b5d6c570d890019d125f65639 /src/app/js/navigate.js | |
parent | 1da35b8903f20f667086beba96585be4ab32706b (diff) | |
download | Viper-2ab6eb9eed73bee67ccc0c03d8588fd77358bbf5.tar.gz Viper-2ab6eb9eed73bee67ccc0c03d8588fd77358bbf5.zip |
fixed sort selector with navigation functions
Diffstat (limited to 'src/app/js/navigate.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; } |