« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ui.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/ui.js b/ui.js
index 5a801de..4b45bc9 100644
--- a/ui.js
+++ b/ui.js
@@ -2059,15 +2059,17 @@ class GrouplikeListingElement extends Form {
   }
 
   hideJumpElement(isCancel) {
-    if (isCancel) {
-      this.form.curIndex = this.oldFocusedIndex
-      this.form.scrollSelectedElementIntoView()
-    }
-    this.jumpElement.visible = false
-    if (this.jumpElement.isSelected) {
-      this.root.select(this)
+    if (this.jumpElement.visible) {
+      if (isCancel) {
+        this.form.curIndex = this.oldFocusedIndex
+        this.form.scrollSelectedElementIntoView()
+      }
+      this.jumpElement.visible = false
+      if (this.jumpElement.isSelected) {
+        this.root.select(this)
+      }
+      this.fixLayout()
     }
-    this.fixLayout()
   }
 
   unselected() {