From 8257ee6027ccb5e43d9f991eee598aaa45a710b4 Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 15 Aug 2018 15:37:01 -0300 Subject: Save/restore selection on Dialog open/close --- ui/Dialog.js | 2 ++ 1 file changed, 2 insertions(+) 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() {} -- cgit 1.3.0-6-gf8a5