diff options
-rw-r--r-- | ui/form/Form.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/form/Form.js b/ui/form/Form.js index 74a1065..451baa4 100644 --- a/ui/form/Form.js +++ b/ui/form/Form.js @@ -117,6 +117,21 @@ module.exports = class Form extends FocusElement { } } + lastInput(selectForm = true) { + this.curIndex = this.inputs.length - 1 + + // TODO: See previousInput + if (!this.inputs[this.curIndex].selectable) { + this.previousInput() + } + + if (selectForm || ( + this.root.isChildOrSelfSelected && this.root.isChildOrSelfSelected(this) + )) { + this.updateSelectedElement() + } + } + selected() { if (this.root.selectedElement === this) { this.updateSelectedElement() |