diff options
author | Florrie <towerofnix@gmail.com> | 2018-08-15 15:37:01 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-08-15 15:37:01 -0300 |
commit | 8257ee6027ccb5e43d9f991eee598aaa45a710b4 (patch) | |
tree | b5204f89043ca045b9ab2f1373e716a128986b54 /ui | |
parent | b3fb0187f9c02cb98d98c41c076036ee2b528455 (diff) |
Save/restore selection on Dialog open/close
Diffstat (limited to 'ui')
-rw-r--r-- | ui/Dialog.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/Dialog.js b/ui/Dialog.js index f2db43d..85ff087 100644 --- a/ui/Dialog.js +++ b/ui/Dialog.js @@ -31,6 +31,7 @@ module.exports = class Dialog extends FocusElement { open() { this.opened() + this.oldSelectedElement = this.root.selectedElement this.visible = true this.root.select(this) this.fixLayout() @@ -39,6 +40,7 @@ module.exports = class Dialog extends FocusElement { close() { this.closed() this.visible = false + this.root.select(this.oldSelectedElement) } opened() {} |