[FIX] mail: load emoji data on focusing composer

Before this commit, typing an emoji source in composer like
emoticon `:)`, it may not substitute to the corresponding emoji.

This happens because the emoji substitution requires loading
emoji data. It was only loaded when opening the emoji picker.

This commit fixes the issue by lazy loading emoji data when
focusing the composer.

closes odoo/odoo#109035

X-original-commit: 066e8029c0d66974c59bfe9e430affb4bf0604b9
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Alexandre Kühn
2023-01-04 14:45:00 +01:00
parent 524e214b3a
commit 2bc10b5328
@@ -291,6 +291,9 @@ Model({
if (!this.exists()) {
return;
}
if (!this.messaging.emojiRegistry.isLoaded && !this.messaging.emojiRegistry.isLoading) {
this.messaging.emojiRegistry.loadEmojiData();
}
this.update({ isFocused: true });
},
onFocusoutTextarea() {