The ConnectOnPageLoad option for Zendesk Chat js widget results in duplicated departments being listed in the widget's dropdown | Community
Skip to main content

The ConnectOnPageLoad option for Zendesk Chat js widget results in duplicated departments being listed in the widget's dropdown

  • October 25, 2022
  • 3 replies
  • 0 views

Hello,

I would like to use the following Chat JS SDK option: https://developer.zendesk.com/api-reference/widget/settings/#connectOnPageLoad. I.e. set the "connectOnPageLoad" option to "false". It does work as described, however it also results in an unwanted side effect (which appears to be a defect), where items in the "Choose a department" dropdown become duplicated. Has anyone come across such a problem, and would be able to shine some light on it?

My complete "zESettings":

window.zESettings = {
  webWidget: {
    chat: {
      connectOnPageLoad: false
    }
  }
};

Thank you.

3 replies

Hi Dominik,
 
I've been unable to reproduce this in a test account.  Are you still seeing this behavior with the widget on a vanilla test page (including no other widget APIs)?

  • Author
  • November 1, 2022

Hi Chris,

I've just created a completely empty index.html file with just the following content, and I still see this behaviour.

<script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=MY_KEY_REDACTED"> </script>

<script>
    window.zESettings = {
        webWidget: {
            chat: {
                connectOnPageLoad: false
            }
        }
    };
</script>

I can probably provide you with my "key", if needed, but I'd rather send it via email.


No problem.  I've created a ticket for us to dive into this together.