You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
simplify handled logic by inverting it
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@ -82,21 +82,20 @@ var LeftPanel = React.createClass({
|
|||||||
|
|
||||||
_onKeyDown: function(ev) {
|
_onKeyDown: function(ev) {
|
||||||
if (!this.focusedElement) return;
|
if (!this.focusedElement) return;
|
||||||
let handled = false;
|
let handled = true;
|
||||||
|
|
||||||
switch (ev.keyCode) {
|
switch (ev.keyCode) {
|
||||||
case KeyCode.TAB:
|
case KeyCode.TAB:
|
||||||
this._onMoveFocus(ev.shiftKey);
|
this._onMoveFocus(ev.shiftKey);
|
||||||
handled = true;
|
|
||||||
break;
|
break;
|
||||||
case KeyCode.UP:
|
case KeyCode.UP:
|
||||||
this._onMoveFocus(true);
|
this._onMoveFocus(true);
|
||||||
handled = true;
|
|
||||||
break;
|
break;
|
||||||
case KeyCode.DOWN:
|
case KeyCode.DOWN:
|
||||||
this._onMoveFocus(false);
|
this._onMoveFocus(false);
|
||||||
handled = true;
|
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
handled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handled) {
|
if (handled) {
|
||||||
|
Reference in New Issue
Block a user