« get me outta code hell

Don't delete the scrollbars - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/ui.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-01-31 13:29:01 -0400
committerFlorrie <towerofnix@gmail.com>2019-01-31 13:29:01 -0400
commitbbd1c3ce5f7a163b9c5fc21069daa120f773902e (patch)
tree9f0c564627eb20427a5b518b3ebb99e24bb73d79 /ui.js
parent4bb56a667d5669e25805a5fbac835ffcbb64b189 (diff)
Don't delete the scrollbars
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui.js b/ui.js
index 0ae5266..441db03 100644
--- a/ui.js
+++ b/ui.js
@@ -1013,8 +1013,8 @@ class GrouplikeListingElement extends Form {
 
     // Just outright scrap the old items - don't deal with any selection stuff
     // (as a result of removeInput) yet.
+    form.children = form.children.filter(child => !form.inputs.includes(child));
     form.inputs = []
-    form.children = []
 
     const parent = this.grouplike[parentSymbol]
     if (parent) {
@@ -2119,8 +2119,9 @@ class ContextMenu extends FocusElement {
     // select() loops that probably explode the world... speaking of things
     // to forget, that one time when I was figuring out menus in the queue.
     // This makes them work.)
+    this.form.children = this.form.children.filter(
+      child => !this.form.inputs.includes(child));
     this.form.inputs = []
-    this.form.children = []
   }
 
   fixLayout() {