Merge pull request #765 from t3chguy/t3chguy/escape-closes-user-settings

Escape closes UserSettings
pull/21833/head
Luke Barnard 2017-04-12 15:18:19 +01:00 committed by GitHub
commit a29d8c2af2
1 changed files with 11 additions and 0 deletions

View File

@ -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) {