On Close callback called multiple times on subsequent calles to ChiliPiper.submit
I've found some strange behavior with the Concierge JS API. Could you help me out?
With HTML as:
<!DOCTYPE html>
<html>
<head></head>
<body>
<script src="https://any.chilipiper.com/concierge-js/cjs/concierge.js"></script>
</body>
</html>
Steps to Reproduce:
1. Open the above HTML in a browser window and navigate to the developer tooling console.
2. Call ChiliPiper JS API as follows (data in following code block is mocked out):
window.ChiliPiper.submit(
'<SOME_SUBDOMAIN>',
'<SOME_ROUTER>',
{
lead: {
PersonEmail: 'mock@email.com',
},
onClose: () => { console.log('On Close'); },
trigger: 'InAppButton',
}
);
3. Notice the ChiliPiper modal appears to book a meeting.
4. Close the ChiliPiper modal to fire the `onClose` handler.
5. Notice 'On Close' is printed in the console.
6. Repeat steps 2 - 4 and notice that each subsequent call to submit, fires the `onClose` handler an extra time. Changing the console log message here can show this more clearly.
Expected behavior:
Each opening of the modal only has one `onClose` handler function call on close of the modal.
The result of this bug is that should users open and close the modal multiple times in a single page view, the `onClose` logic will be fired more and more with each subsequent modal close.
-
Hey Sam
I hope you're doing great today!
Thanks for bringing this to our attention! We will report it internally to our engineers.
Please keep us posted if you have further questions or come across similar findings; we'll be happy to report to the appropriate channel 😄
I wish you a great day and weekend!
1 -
Thank you!
0 -
Hey Sam
I'm here to inform you that our team has fixed the reported issue with the onClose.
Please feel free to test this out and let us know if the fix looks good from your end; we'll be happy to report back to the team if otherwise.
I wish you a great day and week!
0 -
Hi Oladele,
Unfortunately the issue still seems to be happening for me in Firefox with Concierge version 1.3.4400.
Thanks.
0 -
Hi Sam
Thanks for getting back. Based on our testing with Firefox, the onClose is triggered just once.
Can you let us know how you're testing this? Is this working on Chrome and only having issues with Firefox? Any further details you can share would be helpful to us in investigating why the fix might not be working from your end.
0 -
I'm testing as I've described above. I'm repeating the steps I've described. I've tested both on Firefox and Chrome on MacOS. Could it be some kind of caching of the JS?
0
Please sign in to leave a comment.
Comments
6 comments