Listen for escape key anywhere in the inbox

pull/749/head
lilia 10 years ago
parent d7436aaebe
commit 17f3263a21

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

Loading…
Cancel
Save