From 66b44a5d8a5e2a9abd6381cd074dcff4d3487f1a Mon Sep 17 00:00:00 2001 From: Priyanka Kakadiya Date: Wed, 30 May 2018 10:19:05 +0530 Subject: [PATCH] [FIX] mail: auto-focus input on open thread in Discuss (touch and non-mobile devices). Before this commit, when opening a discuss thread with a touch device that is not mobile (e.g. laptop with a touchscreen), the focus was not set on the input automatically. The intent behaviour is to auto-set the focus on non-mobile device including touch devices. This commit fixes this issue for touch and non-mobile devices. Task-ID 1838244 --- addons/mail/static/src/js/discuss.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/js/discuss.js b/addons/mail/static/src/js/discuss.js index 4208fb41cfe..e063ff247ee 100644 --- a/addons/mail/static/src/js/discuss.js +++ b/addons/mail/static/src/js/discuss.js @@ -895,7 +895,7 @@ var Discuss = AbstractAction.extend(ControlPanelMixin, { this._basicComposer.do_toggle(this._thread.getType() !== 'mailbox' && !this._thread.isMassMailing()); this._extendedComposer.do_toggle(this._thread.getType() !== 'mailbox' && !!this._thread.isMassMailing()); - if (!config.device.touch) { + if (!config.device.isMobile) { var composer = this._thread.getType() !== 'mailbox' && this._thread.isMassMailing() ? this._extendedComposer : this._basicComposer;