summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/thread_windows
diff options
context:
space:
mode:
authorLucas Perais (lpe) <lpe@odoo.com>2018-11-21 14:10:35 +0000
committerLucas Perais (lpe) <lpe@odoo.com>2018-11-22 10:11:56 +0000
commitd798c27f273bfc93deb5f3ff866ca6005bde634f (patch)
tree13a60fef5e3266af1fe71d1dd64ce3f802f81fc3 /addons/mail/static/src/js/thread_windows
parent6cfa158b4ddd174d2287b1639ec9149145a86211 (diff)
[FIX] mail: no autofocus when spawning a livechat window
Have a user A having the focus on the search bar, minding his own business Have a user B send a direct message to user A Before this commit, the chat window on user A's browser took the focus manu militari After this commit, the focus stays on user A's search bar OPW 1911553 closes odoo/odoo#28915
Diffstat (limited to 'addons/mail/static/src/js/thread_windows')
-rw-r--r--addons/mail/static/src/js/thread_windows/abstract_thread_window.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/thread_windows/abstract_thread_window.js b/addons/mail/static/src/js/thread_windows/abstract_thread_window.js
index 716b86400be..f4bf9533ff9 100644
--- a/addons/mail/static/src/js/thread_windows/abstract_thread_window.js
+++ b/addons/mail/static/src/js/thread_windows/abstract_thread_window.js
@@ -292,7 +292,9 @@ var AbstractThreadWindow = Widget.extend({
updateVisualFoldState: function () {
if (!this.isFolded()) {
this._threadWidget.scrollToBottom();
- this._focusInput();
+ if (this.options.autofocus) {
+ this._focusInput();
+ }
}
this._animateFold();
},