You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-11-29 21:23:11 +03:00
Merge pull request #765 from t3chguy/t3chguy/escape-closes-user-settings
Escape closes UserSettings
This commit is contained in:
@@ -106,6 +106,17 @@ export default React.createClass({
|
|||||||
var handled = false;
|
var handled = false;
|
||||||
|
|
||||||
switch (ev.keyCode) {
|
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.UP:
|
||||||
case KeyCode.DOWN:
|
case KeyCode.DOWN:
|
||||||
if (ev.altKey) {
|
if (ev.altKey) {
|
||||||
|
|||||||
Reference in New Issue
Block a user