diff options
| author | Sébastien Theys <seb@odoo.com> | 2020-10-30 10:36:40 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2020-10-30 10:36:41 +0000 |
| commit | 4ec26d985f33e1fa391c312b89fc611b8d688c96 (patch) | |
| tree | 5e6de2878d7d39e3db753411e94af72c6c66101f /addons/mail/static/src/components/chat_window/chat_window.js | |
| parent | 9d90fd9a2a65ab1ff338bb109426ca93075937fa (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/chat_window/chat_window.js')
| -rw-r--r-- | addons/mail/static/src/components/chat_window/chat_window.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/addons/mail/static/src/components/chat_window/chat_window.js b/addons/mail/static/src/components/chat_window/chat_window.js index 0f8598257c3..28e7f08a1fb 100644 --- a/addons/mail/static/src/components/chat_window/chat_window.js +++ b/addons/mail/static/src/components/chat_window/chat_window.js @@ -209,34 +209,6 @@ class ChatWindow extends Component { } /** - * Handle focus of the chat window based on position of click. The click on - * chat window that folds it should NOT set focus on this chat window. - * - * @private - * @param {MouseEvent} ev - */ - _onClick(ev) { - const chatWindowHeader = this._chatWindowHeaderRef.el; - if (chatWindowHeader && chatWindowHeader.contains(ev.target)) { - // handled in _onClickedHeader - return; - } - if (this.chatWindow.isFocused) { - return; - } - if (isEventHandled(ev, 'Message.authorOpenChat')) { - return; - } - if (isEventHandled(ev, 'Message.authorOpenProfile')) { - return; - } - if (isEventHandled(ev, 'PartnerImStatusIcon.openChat')) { - return; - } - this.chatWindow.focus(); - } - - /** * Called when clicking on header of chat window. Usually folds the chat * window. * |
