« get me outta code hell

tui-lib - Pure Node.js library for making visual command-line programs (ala vim, ncdu)
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ui/DisplayElement.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/DisplayElement.js b/ui/DisplayElement.js
index a7a371a..32a62b8 100644
--- a/ui/DisplayElement.js
+++ b/ui/DisplayElement.js
@@ -233,7 +233,7 @@ module.exports = class DisplayElement extends Element {
     children.reverse()
 
     for (const el of children) {
-      if (!el.visible || el.clickThrough) {
+      if (!el.visible) {
         continue
       }
 
@@ -242,6 +242,10 @@ module.exports = class DisplayElement extends Element {
         return el2
       }
 
+      if (el.clickThrough) {
+        continue
+      }
+
       const { absX, absY, w, h } = el
       if (absX <= x && absX + w > x) {
         if (absY <= y && absY + h > y) {