vue-zendesk
vue-zendesk copied to clipboard
Ready event
Hey, I found this library very useful but I have a little bit of a problem with it.
I hide the widget upon loaded
event (this.$zendesk.$on('loaded', callback)
) and use my custom button to trigger this.$zendesk.show()
to show it back. Everything is fine except that most of the time, Zendesk widget is loaded but it's not ready, and by not ready I mean when calling this.$zendesk.show()
right after page loaded, it takes like 3-5 seconds to show the widget.
So I am thinking of hiding my custom button until Zendesk is ready, so when the user clicks on it, there is no big delay on showing the widget but I can't seem to find a way to understand that it is ready.
Is there any solution to this?
Hi @HenglyEver,
Well, I don't have this kind of problem.
Do you use the config option hideOnLoad
to automatically hide the widget ?
Did you take a look at the network and performance with dev tools to see if it is not coming from the widget himself ?
I don't think it has something to do with hideOnLoad
or network and performance issue as there was nothing going on when I profiled it. The problem occurs the very first time on every restart, after loaded
fired, I tried to click on the button that trigger this.$zendesk.show();
and it took 3-5 seconds to show it, after that this.$zendesk.hide();
and this.$zendesk.show();
has no delay and are working fine. Do you know what is the problem or any suggestion to remedy this situation?
Hi, Like @gaelreyrol , I believe it's a network / widget issue rather than something directly related with this module. When I open the widget for the first time, it triggers 2 GET requests to XXX.zendesk.com:
- one toward
embeddable_blip
- one toward
tickets_field
Request toward embeddable_blip
is triggered everytime you open the widget. ticket_fields
only the first time. So can you ensure that you do not have latency while retrieving ticket_fields
?
Hi, I wonder if you have options.disabled = true
somewhere to prevent getting the widget on Vue context initialization. In this case, the widget is loaded on demand, which can last a couple of seconds.