From 7409668a5d3adba65ded1bbc802042978f3cf0db Mon Sep 17 00:00:00 2001 From: SilverYoCha Date: Tue, 8 Mar 2022 16:34:53 +0100 Subject: [PATCH] Fixes #2754 --- CHANGES.md | 1 + src/shared/chat/emoji-dropdown.js | 6 ++++++ src/shared/chat/emoji-picker.js | 1 - 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index bfac9174f..356754d2d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,7 @@ - #2733: Fix OMEMO race condition related to automatic reconnection and SMACKS - #2733: Wait for decrypted/parsed message before queuing to UI - #2751: Media not rendered when Converse runs in a browser extension +- #2754: Navigation keys doesn't work anymore into chat input message - #2781: Flashing error when connecting to a room - #2786: Fix webpack configuration not working on Windows OS - #2788: `TypeError` when trying to use `@converse/headless` diff --git a/src/shared/chat/emoji-dropdown.js b/src/shared/chat/emoji-dropdown.js index f93159379..16fabda3a 100644 --- a/src/shared/chat/emoji-dropdown.js +++ b/src/shared/chat/emoji-dropdown.js @@ -95,6 +95,12 @@ export default class EmojiDropdown extends DropdownBase { super.showMenu(); setTimeout(() => this.querySelector('.emoji-search')?.focus()); } + + hideMenu () { + this.chatview.querySelector('converse-emoji-picker')?.disableArrowNavigation(); + super.hideMenu(); + setTimeout(() => this.chatview.querySelector('.chat-textarea')?.focus()); + } } api.elements.define('converse-emoji-dropdown', EmojiDropdown); diff --git a/src/shared/chat/emoji-picker.js b/src/shared/chat/emoji-picker.js index bc5542035..236c27c13 100644 --- a/src/shared/chat/emoji-picker.js +++ b/src/shared/chat/emoji-picker.js @@ -189,7 +189,6 @@ export default class EmojiPicker extends CustomElement { this.onEnterPressed(ev); } else if (ev.keyCode === converse.keycodes.ESCAPE) { u.ancestor(this, 'converse-emoji-dropdown').hideMenu(); - this.chatview.el.querySelector('.chat-textarea').focus(); ev.stopPropagation(); ev.preventDefault(); } else if (