[FIX] mail: allow to CTRL-C in chat window from home menu

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) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Alexandre Kühn
2023-07-07 10:52:55 +02:00
parent d575ebf701
commit 09f2bda7d8
@@ -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 (