From 09f2bda7d80592fdc0277f2982ad1968bd35617c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Thu, 6 Jul 2023 15:17:01 +0000 Subject: [PATCH] [FIX] mail: allow to CTRL-C in chat window from home menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, it was not possible to copy some text content in chat window with CTRL-C from the home menu. This happens because keydown events are intercepted by the (hidden) search bar in the home menu. So when pressing CTRL, the focus is lost in the chat window. This commit fixes the issue by not bubbling events from chat window. Exceptions are inside dropdown, as the keyboard navigation there make use of the hotkey service that needs bubbling of keydown events. closes odoo/odoo#127662 X-original-commit: 05d9d3ce1fed0c76d9c85a50e361035a7a81b46b Signed-off-by: Sébastien Theys (seb) Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/core/common/chat_window.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/mail/static/src/core/common/chat_window.js b/addons/mail/static/src/core/common/chat_window.js index da19af6b21c..82d7bef6da2 100644 --- a/addons/mail/static/src/core/common/chat_window.js +++ b/addons/mail/static/src/core/common/chat_window.js @@ -81,6 +81,7 @@ export class ChatWindow extends Component { if (ev.target.closest(".o-dropdown")) { return; } + ev.stopPropagation(); // not letting home menu steal my CTRL-C switch (ev.key) { case "Escape": if (