From 6c1cddf33f47331c8469eaf5cc661b52afa1fb42 Mon Sep 17 00:00:00 2001 From: Bui Date: Sat, 26 Feb 2022 01:37:44 +0000 Subject: [PATCH] set caret to end --- public/src/js/songselect.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/src/js/songselect.js b/public/src/js/songselect.js index 89e6a78..51500e5 100644 --- a/public/src/js/songselect.js +++ b/public/src/js/songselect.js @@ -429,6 +429,9 @@ class SongSelect{ }else if(this.search.active === 0){ this.searchSetActive(null) this.search.input.focus() + setTimeout(() => { + this.search.input.setSelectionRange(this.search.input.value.length, this.search.input.value.length) + }, 0) }else if(Number.isInteger(this.search.active)){ this.searchSetActive(this.search.active-1) }else{