diff options
author | Florrie <towerofnix@gmail.com> | 2018-11-23 12:48:17 -0400 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-11-23 12:48:17 -0400 |
commit | a928d7de2780afc82ea25ed7dffdf203e13dc3a5 (patch) | |
tree | 12f33707b3f5aabdb8c0e3a708077b16fcda4c4d | |
parent | 3b5bea9be912902f962ed4619092d10fc92e7988 (diff) |
Hide context menu when it's unselected
m--------- | tui-lib | 0 | ||||
-rw-r--r-- | ui.js | 5 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tui-lib b/tui-lib -Subproject 61eb3d20f95a47d1c52edba14a1177d70cdf319 +Subproject 09e1daec696ac8cb41c45029d298135340fc6ed diff --git a/ui.js b/ui.js index df05bf0..7bc6ed2 100644 --- a/ui.js +++ b/ui.js @@ -1682,6 +1682,11 @@ class ContextMenu extends FocusElement { } } + unselected() { + this.selectedBefore = this.root.selectedElement + this.close() + } + close() { this.clearItems() this.visible = false |