Bug: Fix webwidget.triggered event (#750)

This commit is contained in:
Pranav Raj S 2020-04-22 13:14:09 +05:30 committed by GitHub
parent dba6866b6d
commit 645d53db1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -88,11 +88,11 @@ export const IFrameHelper = {
toggleBubble: () => {
onBubbleClick();
if (window.$chatwoot.isOpen) {
IFrameHelper.pushEvent('webwidget.triggered');
}
},
},
pushEvent: eventName => {
IFrameHelper.sendMessage('push-event', { eventName });
},
onLoad: ({ widgetColor }) => {
const iframe = IFrameHelper.getAppFrame();
iframe.style.visibility = '';