« get me outta code hell

Don't bubble cancel in Dialog - 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:
authorFlorrie <towerofnix@gmail.com>2018-09-15 15:39:08 -0300
committerFlorrie <towerofnix@gmail.com>2018-09-15 15:39:08 -0300
commit61eb3d20f95a47d1c52edba14a1177d70cdf319a (patch)
tree714c3d135cd9ecfe675aac91c6d03d1d8a52e029
parentb03a59e8cf545aa3ae61a91e76f5cefa4f0c3701 (diff)
Don't bubble cancel in Dialog
-rw-r--r--ui/Dialog.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/Dialog.js b/ui/Dialog.js
index d200d08..0b77b12 100644
--- a/ui/Dialog.js
+++ b/ui/Dialog.js
@@ -50,6 +50,7 @@ module.exports = class Dialog extends FocusElement {
   keyPressed(keyBuf) {
     if (telc.isCancel(keyBuf)) {
       this.emit('cancelled')
+      return false
     }
   }
 }