harvesthq / platform

A whole new way to add time tracking to your web application.
https://www.getharvest.com/platform
59 stars 11 forks source link

IE 11 .initCustomEvent bug #50

Closed danielroetzer closed 5 years ago

danielroetzer commented 5 years ago

IE 11 complains, when importing your code via <script async src="https://platform.harvestapp.com/assets/platform.js"></script> to setup the harvest button.

Following screenshot shows the error, which is thrown by IE: argument-not-optional

The .initCustomEvent() seems to be the problem. Simply adding an empty object as 4th parameter, solved the issue. So you would have .initCustomEvent("harvest-event:ready", !0, !0, {})

braddunbar commented 5 years ago

Thanks for reporting this @daniel-meisterlabs! I'll get this fixed up.

danielroetzer commented 5 years ago

Thank you for your time!

I tested this locally and putting an empty object or simply null solves the above mentioned error and the Harvest button shows as expected. However, a new problem came up. You can now try to sign-in and the process of signing in seems to work properly, but nothing happens when the sign-in was successful.

In the following screenshot, you can see that the popup tells me, that it was successful and I can close this window. But on doing so, nothing happens. The main window from the Harvest button still shows the sign-in form. Also there are no errors in the console and on other browsers it works fine with the 4th parameter set. sign-in_fails

braddunbar commented 5 years ago

This should be fixed up now @daniel-meisterlabs. Let me know if that's not the case!

braddunbar commented 5 years ago

Hmm…the CustomEvent issue is fixed up now, but I can't seem to reproduce the sign in issue above. Would you let me know if it's still present?

danielroetzer commented 5 years ago

I am not quite sure why, but testing on localhost the sign-in fails, but on our production branch everything works perfectly now. Harvest button shows, you can sign-in and track time through IE 11, so thank you very much!

braddunbar commented 5 years ago

You're welcome! Let me know if you need anything else. :)