aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/app')
-rw-r--r--src/app/index.html2
-rw-r--r--src/app/js/navigate.js15
2 files changed, 11 insertions, 6 deletions
diff --git a/src/app/index.html b/src/app/index.html
index 17e5cf6..06dbcf4 100644
--- a/src/app/index.html
+++ b/src/app/index.html
@@ -259,7 +259,7 @@
<input class="search default-selection" placeholder="%%gui.search%%">
<button class="long" id="sort">
<img src="icons/sort.png" value="unix_created">
- <select>
+ <select class="no-navigate">
<option value="unix_created">%%gui.browser.sort.newest%%</option>
<option value="unix_updated">%%gui.browser.sort.last_updated%%</option>
<option value="rating_score">%%gui.browser.sort.highest_rating%%</option>
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;
}