summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/composer_text_input
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-08-28 12:53:38 +0000
committerSébastien Theys <seb@odoo.com>2020-08-28 16:15:15 +0000
commit17611f4adc5e950b0a75a2a6615b1da3c956387f (patch)
treeede6cbc0bc67c1dceed3b5ca6c1bb3e08389675c /addons/mail/static/src/components/composer_text_input
parent5ba64925fd846e9a9a4884913e3d1004d05ecdf6 (diff)
[FIX] mail, *: fix opens and redirects, adapt messaging menu close
task-2244279 task-2262862 task-2274993 task-2277537 task-2282238 closes odoo/odoo#56745 X-original-commit: 109f202 Related: odoo/enterprise#12761 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/mail/static/src/components/composer_text_input')
-rw-r--r--addons/mail/static/src/components/composer_text_input/composer_text_input.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/addons/mail/static/src/components/composer_text_input/composer_text_input.js b/addons/mail/static/src/components/composer_text_input/composer_text_input.js
index 53616e112e9..6a0943f9ca8 100644
--- a/addons/mail/static/src/components/composer_text_input/composer_text_input.js
+++ b/addons/mail/static/src/components/composer_text_input/composer_text_input.js
@@ -82,6 +82,10 @@ class ComposerTextInput extends Component {
return this.env._t("Write something...");
}
+ focus() {
+ this._textareaRef.el.focus();
+ }
+
focusout() {
this.saveStateInStore();
this._textareaRef.el.blur();
@@ -155,10 +159,6 @@ class ComposerTextInput extends Component {
this.composer.textInputCursorEnd
);
this._updateHeight();
- if (this.composer.isDoFocus) {
- this._textareaRef.el.focus();
- this.composer.update({ isDoFocus: false });
- }
}
/**
@@ -273,7 +273,7 @@ class ComposerTextInput extends Component {
if (this.composer.activeSuggestedPartner) {
this.composer.insertMentionedPartner(this.composer.activeSuggestedPartner);
this.composer.closeMentionSuggestions();
- this.composer.focus();
+ this.focus();
}
}
break;
@@ -322,7 +322,7 @@ class ComposerTextInput extends Component {
_onPartnerMentionSuggestionClicked(ev) {
this.composer.insertMentionedPartner(ev.detail.partner);
this.composer.closeMentionSuggestions();
- this.composer.focus();
+ this.focus();
}
/**