Close emoji panel on escape press

pull/1/head
tommypacker 7 years ago committed by Daniel Gasienica
parent cb0d60c80d
commit 48708d5738

@ -223,6 +223,7 @@
},
events: {
'keydown': 'escapeEmojiPanel',
'submit .send': 'checkUnverifiedSendMessage',
'input .send-message': 'updateMessageFieldSize',
'keydown .send-message': 'updateMessageFieldSize',
@ -1201,6 +1202,13 @@
this.closeEmojiPanel();
}
},
escapeEmojiPanel(e){
// Close emoji panel on escape key press
const keyCode = e.keyCode || e.which;
if (keyCode == 27 && this.emojiPanel != null) {
this.closeEmojiPanel();
}
},
openEmojiPanel() {
this.$emojiPanelContainer.outerHeight(200);
this.emojiPanel = new EmojiPanel(this.$emojiPanelContainer[0], {

Loading…
Cancel
Save