diff options
author | Florrie <towerofnix@gmail.com> | 2018-08-15 15:38:32 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-08-15 15:38:34 -0300 |
commit | 68d5c75dce1c950468d07241261fb9f8c8e3d39b (patch) | |
tree | a932873f5d2bd21da9b5552523ee3f803c7d4545 | |
parent | 8257ee6027ccb5e43d9f991eee598aaa45a710b4 (diff) |
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.
-rw-r--r-- | ui/Dialog.js | 2 |
1 files changed, 1 insertions, 1 deletions
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() |