diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_WebViewClient.java b/mobile/src/com/cradle/iitc_mobile/IITC_WebViewClient.java index e9087550..605fb34d 100644 --- a/mobile/src/com/cradle/iitc_mobile/IITC_WebViewClient.java +++ b/mobile/src/com/cradle/iitc_mobile/IITC_WebViewClient.java @@ -132,12 +132,9 @@ public class IITC_WebViewClient extends WebViewClient { // add all plugins to the script...inject plugins + main script simultaneously js += parsePlugins(); - // need to wrap the mobile iitc.js version in a document ready. IITC - // expects to be injected after the DOM has been loaded completely. - // Since the mobile client injects IITC by replacing the gen_dashboard - // file, IITC runs to early. The document.ready delays IITC long enough - // so it boots correctly. - this.mIitcScript = "setTimeout(function(){" + js + "},1);"; + // IITC expects to be injected after the DOM has been loaded completely. + // since it is injected with the onPageFinished() event, no further delay is necessary. + this.mIitcScript = js; }