Escape closes UserSettings
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
f65cc940c3
commit
69c3bd7f80
1 changed files with 11 additions and 0 deletions
|
@ -99,6 +99,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) {
|
||||
|
|
Loading…
Reference in a new issue