Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

allow using tab to navigate room list in a smarter way #1977

Merged
merged 3 commits into from
Jun 22, 2018
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/components/structures/LeftPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,20 @@ var LeftPanel = React.createClass({

_onKeyDown: function(ev) {
if (!this.focusedElement) return;
let handled = false;
let handled = true;

switch (ev.keyCode) {
case KeyCode.TAB:
this._onMoveFocus(ev.shiftKey);
break;
case KeyCode.UP:
this._onMoveFocus(true);
handled = true;
break;
case KeyCode.DOWN:
this._onMoveFocus(false);
handled = true;
break;
default:
handled = false;
}

if (handled) {
Expand Down