« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/ui.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui.js b/ui.js
index ba60ca0..e9128a3 100644
--- a/ui.js
+++ b/ui.js
@@ -2287,6 +2287,8 @@ class ContextMenu extends FocusElement {
     this.fixLayout()
 
     this.form.firstInput()
+
+    this.keyboardSelector.reset()
   }
 
   keyPressed(keyBuf) {
@@ -2397,6 +2399,10 @@ class KeyboardSelector {
     this.form = form
   }
 
+  reset() {
+    this.value = ''
+  }
+
   keyPressed(keyBuf) {
     // Don't do anything if the input isn't a single keyboard character.
     if (keyBuf.length !== 1 || keyBuf[0] <= 31 || keyBuf[0] >= 127) {