1

I am using Telerik UI controls. They have a embedded JS, which looks like is having some dependency on Safari 9.0.3(10601.44) Developer console.

When we try to load telerik tree-view in telerik combo box, we get the followin error. Only in Safari 9.0.3(10601.44)

enter image description here

Same in text

_initRightToLeftScriptResource.axd:8396TypeError: null is not an object (evaluating 'c.set_additionalQueryString')
_initRightToLeftScriptResource.axd:8395
initializeScriptResource.axd:8332
endUpdateTelerik.Web.UI.WebResource.axd:2:49050
endCreateComponentsTelerik.Web.UI.WebResource.axd:2:63458
_raiseInitTelerik.Web.UI.WebResource.axd:2:65559
_doInitializeTelerik.Web.UI.WebResource.axd:2:63974
(anonymous function)Telerik.Web.UI.WebResource.axd:2:65784
(anonymous function)Telerik.Web.UI.WebResource.axd:2:50713
pTelerik.Web.UI.WebResource.axd:2:558
_2PassTelerik.Web.UI.WebResource.axd:2:50697

My problem is very similar to this Why does JavaScript only work after opening developer tools in IE once? but in Safari.

I tried all those suggestions, none of them were helping.

Update


Code works fine with some delay in calling function.

 if (navigator.sayswho === "Safari 9") {
                    setTimeout(function() {
                        try {
                        loadInit();
                        } catch (e) {
                            alert("error");
                            console.log(e);
                        } 
                    }, 1000);

tried all following, none is working, not sure how to trace the right event of full DOM is loaded and no pending ajax calls happening.

$(document).load(...)
$(window).load(...)
<body onload="....">
Community
  • 1
  • 1
HaBo
  • 13,999
  • 36
  • 114
  • 206
  • Just a related issue. Same problem here: http://stackoverflow.com/questions/41719570/undefined-error-in-plupload-dispatchevent-on-mac-safari – Slickrick12 Feb 23 '17 at 17:40

1 Answers1

0

Since you are using Telerik controls, use:

Sys.Application.add_load(MyFunction);

function MyFunction(sndr, args){
//your code
}

This only calls the function once all the telerik controls have loaded.