Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 760a2d84 authored by Alan Viverette's avatar Alan Viverette
Browse files

Re-enable TAB traversal in ListView

This makes navigation asymmetrical, but that's preferable to navigation
straight-up not working at all.

Bug: 14392811
Change-Id: Ifbb41adabdc9e015c8ed7195cbfb92ec0d8458a0
parent cbb6c16f
Loading
Loading
Loading
Loading
+8 −12
Original line number Diff line number Diff line
@@ -2279,19 +2279,15 @@ public class ListView extends AbsListView {
                break;

            case KeyEvent.KEYCODE_TAB:
                // XXX Sometimes it is useful to be able to TAB through the items in
                //     a ListView sequentially.  Unfortunately this can create an
                //     asymmetry in TAB navigation order unless the list selection
                //     always reverts to the top or bottom when receiving TAB focus from
                //     another widget.  Leaving this behavior disabled for now but
                //     perhaps it should be configurable (and more comprehensive).
                if (false) {
                // This creates an asymmetry in TAB navigation order. At some
                // point in the future we may decide that it's preferable to
                // force the list selection to the top or bottom when receiving
                // TAB focus from another widget, but for now this is adequate.
                if (event.hasNoModifiers()) {
                    handled = resurrectSelectionIfNeeded() || arrowScroll(FOCUS_DOWN);
                } else if (event.hasModifiers(KeyEvent.META_SHIFT_ON)) {
                    handled = resurrectSelectionIfNeeded() || arrowScroll(FOCUS_UP);
                }
                }
                break;
            }
        }