diff options
author | Florrie <towerofnix@gmail.com> | 2018-06-01 08:35:44 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-06-01 08:35:44 -0300 |
commit | 23dc4b24d92eb2e19c55029522acabfccb701915 (patch) | |
tree | 56714f19c06b38f7d1baf0486fe09d3a1d9b21d6 /ui | |
parent | b7e7223670328b4cba1c1454dd25057d24025b2b (diff) |
Add scrollSelectedElementIntoView function
Diffstat (limited to 'ui')
-rw-r--r-- | ui/form/ListScrollForm.js | 4 |
1 files changed, 4 insertions, 0 deletions
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), |