From 932fe2b8f675893f69cb5eed53b2b0ed1f8c6077 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 12 Jul 2013 10:22:06 -0500 Subject: [PATCH] comment. docs. --- README.md | 6 +++--- lib/widget.js | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cccf1ca..94934dc 100644 --- a/README.md +++ b/README.md @@ -606,10 +606,10 @@ A very simple file manager for selecting files. ##### Methods: - inherits all from List. -- **refresh([callback])** - refresh the file list (perform a `readdir` on `cwd` +- **refresh([cwd], [callback])** - refresh the file list (perform a `readdir` on `cwd` and update the list items). -- **pick(callback)** - pick a single file and return the path in the callback. -- **reset([callback])** - reset back to original cwd. +- **pick([cwd], callback)** - pick a single file and return the path in the callback. +- **reset([cwd], [callback])** - reset back to original cwd. ### Positioning diff --git a/lib/widget.js b/lib/widget.js index 71f06fc..75eafdb 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -374,8 +374,13 @@ Screen.prototype._listenMouse = function(el) { for (; i < clickable.length; i++) { el = clickable[i]; + if (!el.visible) continue; + // Something like (doesn't work because textbox is usually focused): + // if (self.grabKeys && self.focused !== el + // && !el.hasAncestor(self.focused)) continue; + // Get the true coordinates. ret = el._lastPos; if (!ret) continue;