From 629b904f325365a315a3932fcd0f7363590dd8ed Mon Sep 17 00:00:00 2001 From: Renaud Thiry Date: Wed, 23 Nov 2022 10:55:33 +0000 Subject: [PATCH] [FIX] mail: focus on search bar after load MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The logic to set the focus on the emoji search bar was only triggered the first time any emoji picker was opened. This makes sure the focus is processed every time a picker is opened. task - 3035021 closes odoo/odoo#106315 Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/models/emoji_picker_view.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/mail/static/src/models/emoji_picker_view.js b/addons/mail/static/src/models/emoji_picker_view.js index 421b3c63201..bb6681d4d7b 100644 --- a/addons/mail/static/src/models/emoji_picker_view.js +++ b/addons/mail/static/src/models/emoji_picker_view.js @@ -13,13 +13,13 @@ Model({ }, lifecycleHooks: { _created() { + if (!this.messaging.device.isSmall) { + this.update({ isDoFocus: true }); + } if (this.messaging.emojiRegistry.isLoaded || this.messaging.emojiRegistry.isLoading) { return; } this.messaging.emojiRegistry.loadEmojiData(); - if (!this.messaging.device.isSmall) { - this.update({ isDoFocus: true }); - } }, }, recordMethods: {