From fe1f47099514b608524ee80104b9675c1a67580a Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 30 Jul 2015 17:58:30 -0700 Subject: [PATCH] allow focusing of detached children still. --- lib/widgets/screen.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/widgets/screen.js b/lib/widgets/screen.js index 775344a..2df00f2 100644 --- a/lib/widgets/screen.js +++ b/lib/widgets/screen.js @@ -1623,11 +1623,9 @@ Screen.prototype._focus = function(self, old) { if (el.scrollable) break; } - if (el && el.detached) return; - // If we're in a scrollable element, // automatically scroll to the focused element. - if (el) { + if (el && !el.detached) { // NOTE: This is different from the other "visible" values - it needs the // visible height of the scrolling element itself, not the element within // it.