From 346e5d896fa9b4a67fd25d2b46626d9cfe33b9d7 Mon Sep 17 00:00:00 2001 From: Ariel Fuggini Date: Wed, 24 Jun 2020 14:05:36 -0500 Subject: [PATCH] Updated selector --- src/converse-emoji-views.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/converse-emoji-views.js b/src/converse-emoji-views.js index ce38e209c..0c51d1974 100644 --- a/src/converse-emoji-views.js +++ b/src/converse-emoji-views.js @@ -331,7 +331,9 @@ converse.plugins.add('converse-emoji-views', { } else if (ev.keyCode === converse.keycodes.ENTER) { this.onEnterPressed(ev); } else if (ev.keyCode === converse.keycodes.ESCAPE) { - document.querySelector('.chat-textarea').focus(); + this.chatview.el.querySelector('.chat-textarea').focus(); + ev.stopPropagation(); + ev.preventDefault(); } else if ( ev.keyCode !== converse.keycodes.ENTER && ev.keyCode !== converse.keycodes.DOWN_ARROW