Commit a78763b5 authored by Ariel Fuggini's avatar Ariel Fuggini Committed by JC Brand

Focus on message textarea when pressing escape on emoji dropdown

parent 6b55907d
...@@ -330,6 +330,8 @@ converse.plugins.add('converse-emoji-views', { ...@@ -330,6 +330,8 @@ converse.plugins.add('converse-emoji-views', {
this.enableArrowNavigation(ev); this.enableArrowNavigation(ev);
} else if (ev.keyCode === converse.keycodes.ENTER) { } else if (ev.keyCode === converse.keycodes.ENTER) {
this.onEnterPressed(ev); this.onEnterPressed(ev);
} else if (ev.keyCode === converse.keycodes.ESCAPE) {
document.querySelector('.chat-textarea').focus();
} else if ( } else if (
ev.keyCode !== converse.keycodes.ENTER && ev.keyCode !== converse.keycodes.ENTER &&
ev.keyCode !== converse.keycodes.DOWN_ARROW ev.keyCode !== converse.keycodes.DOWN_ARROW
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment