partytown icon indicating copy to clipboard operation
partytown copied to clipboard

[🐞] Partytown doesn't work with Chatwoot

Open mariofernandu opened this issue 8 months ago • 2 comments

Describe the bug

In the video, I create a chatwoot instance, and then I execute $chatwoot.toggle(); to show it.

The widget is transparent because partytown modify iframe.

https://github.com/BuilderIO/partytown/assets/102629955/d42b1518-d5d2-4fbc-a872-52dd312d7712

I think the problem is in iframe

with partytown image

without partytown image

NUXT 3

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: { enabled: true },
  modules: [
    "nuxt-purgecss",
    "@nuxt/image",
    "@nuxtjs/partytown",
    "@productdevbook/chatwoot",
  ],
  partytown: {
    debug: true,
    forward: [
      "chatwootSDK.run",
      "chatwootSDK.run",

      "$chatwoot.toggle",
      "$chatwoot.toggle",

      "$chatwoot.isOpen",
      "$chatwoot.isOpen",

      "$chatwoot.websiteToken",
      "$chatwoot.websiteToken",
    ],
  },

.....

  chatwoot: {
    init: {
      websiteToken: "exampleToken",
      baseUrl: "https://chat.hostname.com",
    },
    // If this is loaded you can make it true, https://github.com/nuxt-modules/partytown
    partytown: true,
  },
});

Reproduction

N/A

Steps to reproduce

N/A

Browser Info

Edge

Additional Information

partytown 0.8.1

mariofernandu avatar Dec 20 '23 01:12 mariofernandu

Hi @mariofernandu, can you create a specific test in the codebase to reproduce this case pls? A vanilla JS one will be awesome, thanks

gioboa avatar Dec 20 '23 08:12 gioboa

Hi @mariofernandu, can you create a specific test in the codebase to reproduce this case pls? A vanilla JS one will be awesome, thanks

Hi thanks for your time and help

You can download the code of the test here

https://issue515.clotrservers.com/partytown-issue-515.zip

and view live here:

https://issue515.clotrservers.com/index.html

mariofernandu avatar Dec 21 '23 02:12 mariofernandu