Closed tiberiumihai closed 6 years ago
I confirm this is a bug. The workaround work like a charm.
I'd definitely be open to seeing a PR for this issue. This seems like a simple enough fix, but currently the behavior lives inside the provider. I remember, it was formerly outside of the provider, and would execute before Angular's instantiation. I'd be open to seeing a new implementation of a fix for this issue, though. Thanks!
Sure. I'm working on a Fix, I'll send a PR when it's finished. Thanks!
I'm trying to push a new branch fix-injecting-intercom-script
where the changes resides but I get this:
ERROR: Permission to CaliStyle/ng-intercom.git denied to tiberiumihai.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
You’ll want to fork the repo and do a pull request. Thanks!
Sent from out and about
On Aug 3, 2018, at 6:45 AM, tiberiumihai notifications@github.com wrote:
I'm trying to push a new branch fix-injecting-intercom-script where the changes resides but I get this:
ERROR: Permission to CaliStyle/ng-intercom.git denied to tiberiumihai. fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
@wbhob @scott-wyatt I've added the PR with the fix. Can you take a look and let me know if it requires anything else? It seems that the bug is gone after this fix.
After merging and publishing to 6.0.0beta3, this issue is now fixed. Thanks!
Closing.
Versions
Description
IntercomJS is loaded on window.onload event instead of scriptElement.onload, or by a function to init and load the js.
When intercom js is injected before window.load is fired, the module will load and work just fine. But when intercom is injected after window.load was fired, the intercom JS won't be loaded because window.load already fired, and thus the component won't work.
To fix this issue, we had to use this workaround in our wrapper component to manually load the intercom js.
Possible solution
Is it possible to move the module loading through a function to be called manually or replace the
window.onload
withscriptElement.onload
of the intercom js script injected?