From 1899d542f50300408c39a119b2e4afc9c12d91f9 Mon Sep 17 00:00:00 2001 From: Theodore Tomalty Date: Fri, 21 Dec 2018 15:58:34 -0500 Subject: [PATCH 1/4] fix widget size when closed on mobile --- src/components/Widget/layout.js | 7 ++++++- src/components/Widget/style.scss | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/Widget/layout.js b/src/components/Widget/layout.js index 88c94fb8..8f4fb627 100644 --- a/src/components/Widget/layout.js +++ b/src/components/Widget/layout.js @@ -13,12 +13,17 @@ const WidgetLayout = (props) => { } const showCloseButton = props.showCloseButton !== undefined ? props.showCloseButton : !props.embedded; const isVisible = props.isChatVisible && !(props.hideWhenNotConnected && !props.connected); + const chatShowing = (props.isChatOpen || props.embedded); + + if (chatShowing) { + classes.push('chat-open'); + } return ( isVisible ?
{ - (props.isChatOpen || props.embedded) && + chatShowing && Date: Fri, 21 Dec 2018 15:58:58 -0500 Subject: [PATCH 2/4] fix same problem in fullscreen mode --- src/components/Widget/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Widget/style.scss b/src/components/Widget/style.scss index a67f5aad..0629badd 100644 --- a/src/components/Widget/style.scss +++ b/src/components/Widget/style.scss @@ -13,7 +13,7 @@ align-items: flex-end; justify-content: flex-end; - &.full-screen { + &.full-screen.chat-open { @include widget-container-fs; } } From 39c98c3bfde220835d768c803dd9e672b9452b94 Mon Sep 17 00:00:00 2001 From: Theodore Tomalty Date: Fri, 21 Dec 2018 16:07:04 -0500 Subject: [PATCH 3/4] remove chat-open css class for embedded components (preemptive fix) --- src/components/Widget/layout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Widget/layout.js b/src/components/Widget/layout.js index 8f4fb627..bd7d2ceb 100644 --- a/src/components/Widget/layout.js +++ b/src/components/Widget/layout.js @@ -15,7 +15,7 @@ const WidgetLayout = (props) => { const isVisible = props.isChatVisible && !(props.hideWhenNotConnected && !props.connected); const chatShowing = (props.isChatOpen || props.embedded); - if (chatShowing) { + if (chatShowing && !props.embedded) { classes.push('chat-open'); } From 1aca713c13e51fd65ebaf43ee9a142719b7b72b8 Mon Sep 17 00:00:00 2001 From: Theodore Tomalty Date: Fri, 21 Dec 2018 16:11:21 -0500 Subject: [PATCH 4/4] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69e57697..8ff32ec1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.5.3 - Added the parameter hideWhenNotConnected to not display the widget when the server is not connected (defaults to true) - Fixed issue where the 'connected' property was being loaded from previous session instead of being triggered on actual connection +- Reduced the size of the widget container on mobile and in fullscreen mode (blocking clicks) ## 0.5.2 - Added support for custom images for open and close buttons of chatWidget interface