Listen for escape key anywhere in the inbox

This commit is contained in:
lilia 2015-01-26 12:15:07 -10:00
parent d7436aaebe
commit 17f3263a21

View file

@ -47,9 +47,9 @@
}.bind(this));
},
events: {
'keyup': 'keyup',
'click .back button': 'hideCompose',
'click .fab': 'showCompose',
'keyup input.new-message': 'compose',
'open .contact': 'openConversation'
},
openConversation: function(e, data) {
@ -69,7 +69,7 @@
this.$fab.show();
this.$back.hide();
},
compose: function(e) {
keyup: function(e) {
if (e.keyCode === 27) {
this.hideCompose();
}