From 24f02393eb2b3d2570bdbc2a7161513a32790657 Mon Sep 17 00:00:00 2001 From: Bui Date: Fri, 25 Feb 2022 19:07:53 +0000 Subject: [PATCH] allow ctrl+f from diff sel, fix input focus --- public/src/js/songselect.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/public/src/js/songselect.js b/public/src/js/songselect.js index 021f3d5..0420c80 100644 --- a/public/src/js/songselect.js +++ b/public/src/js/songselect.js @@ -474,7 +474,10 @@ class SongSelect{ this.playBgm(false) } }else if(this.state.screen === "difficulty"){ - if(name === "confirm"){ + if(event && event.keyCode && event.keyCode === 70 && ctrl){ + this.displaySearch() + event.preventDefault() + }else if(name === "confirm"){ if(this.selectedDiff === 0){ this.toSongSelect() }else if(this.selectedDiff === 1){ @@ -2771,7 +2774,10 @@ class SongSelect{ this.playSound("se_pause") loader.screen.appendChild(this.search.div) this.setSearchTip() - this.search.input.focus() + + setTimeout(() => { + this.search.input.focus() + }, 10) } removeSearch(byUser=false){