From 68fce2031ce323b57a20998d718f8f81026f0e4b Mon Sep 17 00:00:00 2001 From: Florrie Date: Thu, 11 Apr 2019 21:26:38 -0300 Subject: Reset keyboard selector value when menu opens Otherwise you could type, for example, P to select "process...", then close the menu, then reopen it and press R to jump to "remove...", but it would just select "process" again because that matches "PR". --- ui.js | 6 ++++++ 1 file changed, 6 insertions(+) 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) { -- cgit 1.3.0-6-gf8a5