From 96ebb862016f0d9b3f7450f22c8859502c834832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Thu, 30 Mar 2023 14:59:56 +0000 Subject: [PATCH] [FIX] mail: CTRL-C content in chat window from home menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, when in home menu with a chat window, it was not possible to copy content in conversation with CTRL-C. This was due to keydown event being intercepted by the hidden home menu input. This commit solves the issue by not propagating keydown events above chat window, so it's not intercepted by the home menu for his input. closes odoo/odoo#117211 Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/web/chat_window/chat_window.js | 2 -- addons/mail/static/src/web/chat_window/chat_window.xml | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/mail/static/src/web/chat_window/chat_window.js b/addons/mail/static/src/web/chat_window/chat_window.js index 428593c9838..0c805032aa1 100644 --- a/addons/mail/static/src/web/chat_window/chat_window.js +++ b/addons/mail/static/src/web/chat_window/chat_window.js @@ -76,8 +76,6 @@ export class ChatWindow extends Component { onKeydown(ev) { switch (ev.key) { case "Escape": - // prevent reopening last app when in home menu - ev.stopPropagation(); if ( isEventHandled(ev, "NavigableList.close") || isEventHandled(ev, "Composer.discard") diff --git a/addons/mail/static/src/web/chat_window/chat_window.xml b/addons/mail/static/src/web/chat_window/chat_window.xml index 8ae1f01d090..336c2988431 100644 --- a/addons/mail/static/src/web/chat_window/chat_window.xml +++ b/addons/mail/static/src/web/chat_window/chat_window.xml @@ -9,7 +9,8 @@ 'o-folded': props.chatWindow.folded, 'position-absolute bottom-0 rounded-top-3 bg-view overflow-hidden d-flex flex-column': !props.chatWindow.hidden }" - t-on-keydown="onKeydown" + t-on-keydown.stop="onKeydown" + tabindex="1" >