Fix keyboard handling for info overlays.

For info overlays (keyboard/markdown/search help) we now let
the modal portions of the widget have focus, so that you can
page around.  And then tab switching still works with the arrow
keys.
This commit is contained in:
Steve Howell
2018-04-04 11:01:34 -04:00
committed by Tim Abbott
parent bd591424e2
commit 0e7073ec29
2 changed files with 31 additions and 5 deletions

View File

@@ -62,7 +62,10 @@ exports.toggle = (function () {
}
meta.idx = idx;
elem.focus();
if (!opts.child_wants_focus) {
elem.focus();
}
}
function maybe_go_left() {
@@ -99,6 +102,9 @@ exports.toggle = (function () {
}());
var prototype = {
maybe_go_left: maybe_go_left,
maybe_go_right: maybe_go_right,
value: function () {
if (meta.idx >= 0) {
return opts.values[meta.idx].label;