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 b46d6a8645c..700603c914e 100644 --- a/addons/mail/static/src/web/chat_window/chat_window.js +++ b/addons/mail/static/src/web/chat_window/chat_window.js @@ -80,11 +80,12 @@ export class ChatWindow extends Component { } get style() { + const maxHeight = !this.store.isSmall ? "max-height: 95vh;" : ""; const textDirection = localization.direction; const offsetFrom = textDirection === "rtl" ? "left" : "right"; const visibleOffset = this.store.isSmall ? 0 : this.props.right; const oppositeFrom = offsetFrom === "right" ? "left" : "right"; - return `${offsetFrom}: ${visibleOffset}px; ${oppositeFrom}: auto`; + return `${offsetFrom}: ${visibleOffset}px; ${oppositeFrom}: auto; ${maxHeight}`; } onKeydown(ev) { @@ -114,6 +115,9 @@ export class ChatWindow extends Component { } toggleFold() { + if (this.store.isSmall) { + return; + } if (this.props.chatWindow.hidden) { this.chatWindowService.makeVisible(this.props.chatWindow); } else { diff --git a/addons/mail/static/src/web/chat_window/chat_window.scss b/addons/mail/static/src/web/chat_window/chat_window.scss index 28848e090e3..988139f7aa6 100644 --- a/addons/mail/static/src/web/chat_window/chat_window.scss +++ b/addons/mail/static/src/web/chat_window/chat_window.scss @@ -1,5 +1,4 @@ .o-mail-ChatWindow { - max-height: 95vh; height: 460px; width: $o-mail-ChatWindow-width; z-index: 999; // messaging menu is dropdown (1000) 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 e0bf156852a..b95d95ff84a 100644 --- a/addons/mail/static/src/web/chat_window/chat_window.xml +++ b/addons/mail/static/src/web/chat_window/chat_window.xml @@ -7,12 +7,13 @@ t-att-class="{ 'w-100 h-100': store.isSmall, 'o-folded': props.chatWindow.folded, - 'position-absolute bottom-0 rounded-top-3 overflow-hidden d-flex flex-column': !props.chatWindow.hidden + 'position-absolute bottom-0 overflow-hidden d-flex flex-column': !props.chatWindow.hidden, + 'rounded-top-3': !props.chatWindow.hidden and !store.isSmall, }" t-on-keydown.stop="onKeydown" tabindex="1" > -