CTRL + F will now focus and select the search box

This commit is contained in:
booploops 2021-12-16 02:11:25 -08:00
parent 570afdb2a4
commit 3ecf4ff3a0
2 changed files with 10 additions and 0 deletions

View file

@ -1817,6 +1817,15 @@ const app = new Vue({
} }
} }
}) })
// Key binds
document.addEventListener('keydown', function (e) {
if (e.keyCode === 70 && e.ctrlKey) {
app.$refs.searchInput.focus()
app.$refs.searchInput.select()
}
});
// Hang Timer // Hang Timer
app.hangtimer = setTimeout(()=>{ app.hangtimer = setTimeout(()=>{
if(confirm("Cider is not responding. Reload the app?")) { if(confirm("Cider is not responding. Reload the app?")) {

View file

@ -142,6 +142,7 @@
v-on:keyup.enter="searchQuery();search.showHints = false" v-on:keyup.enter="searchQuery();search.showHints = false"
@change="showSearch();" @input="getSearchHints()" placeholder="Search..." @change="showSearch();" @input="getSearchHints()" placeholder="Search..."
v-model="search.term" v-model="search.term"
ref="searchInput"
class="search-input"> class="search-input">
</div> </div>
</div> </div>