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

Commit

Permalink
Merge pull request #765 from t3chguy/t3chguy/escape-closes-user-settings
Browse files Browse the repository at this point in the history
Escape closes UserSettings
  • Loading branch information
lukebarnard1 authored Apr 12, 2017
2 parents 1d836c7 + 69c3bd7 commit a29d8c2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/components/structures/LoggedInView.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,17 @@ export default React.createClass({
var handled = false;

switch (ev.keyCode) {
case KeyCode.ESCAPE:

// Implemented this way so possible handling for other pages is neater
switch (this.props.page_type) {
case PageTypes.UserSettings:
this.props.onUserSettingsClose();
handled = true;
break;
}

break;
case KeyCode.UP:
case KeyCode.DOWN:
if (ev.altKey) {
Expand Down

0 comments on commit a29d8c2

Please sign in to comment.