From 23dc4b24d92eb2e19c55029522acabfccb701915 Mon Sep 17 00:00:00 2001 From: Florrie Date: Fri, 1 Jun 2018 08:35:44 -0300 Subject: Add scrollSelectedElementIntoView function --- ui/form/ListScrollForm.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ui/form/ListScrollForm.js') diff --git a/ui/form/ListScrollForm.js b/ui/form/ListScrollForm.js index a06efda..ae267c6 100644 --- a/ui/form/ListScrollForm.js +++ b/ui/form/ListScrollForm.js @@ -74,6 +74,10 @@ module.exports = class ListScrollForm extends Form { super.keyPressed(keyBuf) } + this.scrollSelectedElementIntoView() + } + + scrollSelectedElementIntoView() { const sel = this.inputs[this.curIndex] // If the item is ahead of our view (either to the right of or below), -- cgit 1.3.0-6-gf8a5