fix: Add missing close button if bubble is hidden (#1435)

This commit is contained in:
Pranav Raj S
2020-11-23 10:49:28 +05:30
committed by GitHub
parent fcf91f60fb
commit 4fe29fefb4
5 changed files with 25 additions and 3 deletions

View File

@@ -34,7 +34,10 @@ export const IFrameHelper = {
iframe.id = 'chatwoot_live_chat_widget';
iframe.style.visibility = 'hidden';
const holderClassName = `woot-widget-holder woot--hide woot-elements--${window.$chatwoot.position}`;
let holderClassName = `woot-widget-holder woot--hide woot-elements--${window.$chatwoot.position}`;
if (window.$chatwoot.hideMessageBubble) {
holderClassName += ` woot-widget--without-bubble`;
}
addClass(widgetHolder, holderClassName);
widgetHolder.appendChild(iframe);
body.appendChild(widgetHolder);
@@ -114,6 +117,9 @@ export const IFrameHelper = {
},
setBubbleLabel(message) {
if (window.$chatwoot.hideMessageBubble) {
return;
}
setBubbleText(window.$chatwoot.launcherTitle || message.label);
},