From 68d5c75dce1c950468d07241261fb9f8c8e3d39b Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 15 Aug 2018 15:38:32 -0300 Subject: Save oldSelectedElement before calling Dialog.opened The main purpose of Dialog.opened is to select an input in any case (e.g. opened() { this.root.select(this.input) }) so it makes more sense to save whichever element was selected before calling that. --- ui/Dialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/Dialog.js b/ui/Dialog.js index 85ff087..d200d08 100644 --- a/ui/Dialog.js +++ b/ui/Dialog.js @@ -30,8 +30,8 @@ module.exports = class Dialog extends FocusElement { } open() { - this.opened() this.oldSelectedElement = this.root.selectedElement + this.opened() this.visible = true this.root.select(this) this.fixLayout() -- cgit 1.3.0-6-gf8a5