summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/composer
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-10-30 10:36:40 +0000
committerSébastien Theys <seb@odoo.com>2020-10-30 10:36:41 +0000
commit4ec26d985f33e1fa391c312b89fc611b8d688c96 (patch)
tree5e6de2878d7d39e3db753411e94af72c6c66101f /addons/mail/static/src/components/composer
parent9d90fd9a2a65ab1ff338bb109426ca93075937fa (diff)
[FIX] mail: remove chat window auto-focus on click
This causes more trouble than it's worth, especially with mobile keyboards. It also prevents from selecting any text in chat window threads. task-2372553 Part of task-2277543 closes odoo/odoo#61031 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/components/composer')
-rw-r--r--addons/mail/static/src/components/composer/composer.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/mail/static/src/components/composer/composer.js b/addons/mail/static/src/components/composer/composer.js
index 95a09f7820f..6c9965a57d1 100644
--- a/addons/mail/static/src/components/composer/composer.js
+++ b/addons/mail/static/src/components/composer/composer.js
@@ -217,7 +217,9 @@ class Composer extends Component {
*/
_onClickAddAttachment() {
this._fileUploaderRef.comp.openBrowserFileUploader();
- this.focus();
+ if (!this.env.device.isMobile) {
+ this.focus();
+ }
}
/**
@@ -302,7 +304,9 @@ class Composer extends Component {
ev.stopPropagation();
this._textInputRef.comp.saveStateInStore();
this.composer.insertIntoTextInput(ev.detail.unicode);
- this.focus();
+ if (!this.env.device.isMobile) {
+ this.focus();
+ }
}
/**