[FIX] mail: focus on search bar after load

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) <aku@odoo.com>
This commit is contained in:
Renaud Thiry
2022-11-23 13:24:56 +01:00
parent 459684e2a1
commit 629b904f32
@@ -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: {