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

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) <aku@odoo.com>
This commit is contained in:
Alexandre Kühn
2023-03-30 18:59:05 +02:00
parent 1ebcdb0023
commit 96ebb86201
2 changed files with 2 additions and 3 deletions
@@ -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")
@@ -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"
>
<div class="o-mail-ChatWindow-header d-flex align-items-center cursor-pointer flex-shrink-0" t-on-click="toggleFold">
<div t-if="store.isSmall" class="cursor-pointer d-flex align-items-center h-100 px-3 py-0 me-2" title="Close conversation" t-on-click="() => this.close()">