Issues

ZF-5808: dojo()->onLoadCaptureStart() appears on page before dijit elements are loaded

Description

dojo()->onLoadCaptureStart() appears on page before dijit elements are loaded


10 dojo.addOnLoad(function() {
11 from = dojo.byId('calldetails-from');
12 frombutton = dijit.byId('frombutton');
13 serviceprovider = dojo.byId('calldetails-service_provider');
14 spbutton = dijit.byId('service_providerbutton');
15 contact_name = dijit.byId('calldetails-contact_name');
16 contact_no = dijit.byId('calldetails-contact_no');
17 callerinfo = dojo.byId('callerinfo');
18 historydiv = dojo.byId('history');
19 submit = dijit.byId('Submit');
20
21 dojo.connect(from, 'onblur', checkExists);
22 dojo.connect(frombutton, 'onClick', loadHistory);
23 dojo.connect(serviceprovider, 'onblur', getHistory);
24 dojo.connect(spbutton, 'onClick', loadHistorySP);
25 }
26 );
27 dojo.addOnLoad(function() {
28 spstore = new dojo.data.ItemFileReadStore({"url":"action\/get-service-providers"});
29 });
30 dojo.addOnLoad(function() {
31 dojo.forEach(zendDijits, function(info) {
32 var n = dojo.byId(info.id);
33 if (null != n) {
34 dojo.attr(n, dojo.mixin({ id: info.id }, info.params));
35 }
36 });
37 dojo.parser.parse();
38 });

if you look at this code the Zenddijits are being processed last. So any code inside dojo()->onLoadCaptureStart() which uses dijit.byId('element-id') will return null or undefined

Comments

This is a duplicate of ZF-4587, and will be resolved for 1.8 or sooner.

Fix committed to trunk and merged to 1.7 release branch; should release with 1.7.6 next week.