PDA

View Full Version : IE8, suspendCheckChange



wojteks27
1 Apr 2014, 4:18 AM
Is it possible, that modyfing suspendCheckChange property doesn't work in IE8?

Such code works in every other browser than IE


var basic = form.getForm();


basic.getFields().each(function (i) {
if (i.xtype !== "checkbox") {
i.suspendCheckChange++;
}
});


form.getForm().loadRecord(form.record);


//perform some actions on loaded data, modify some fields, show some alerts depending on data, etc.

basic.getFields().each(function (i) {
if (i.xtype !== "checkbox") {
i.suspendCheckChange--;
} else {
if (!i.value) {
var fs = i.up('fieldset');
fs.fireEvent('collapse', fs);
}
}
});

in IE events get fired.

Any ideas?

Thanks in advance for any help.

Gary Schlosberg
2 Apr 2014, 8:31 AM
I couldn't find any existing issues with IE8 and suspendCheckChange, but please note that the suspendCheckChange property is private and isn't guaranteed to be there in future releases. What are you looking to accomplish?

wojteks27
2 Apr 2014, 11:54 PM
Thank you for your answer.

I want to setup a form as such that I will be able to reuse for adding, editing and showing data. It switches modes based on some "mode" variable.

Now when I use it for editing or showing data in every browser except IE loading the data into it works well, the events are suspended on every field, data is loaded and the events are resumed (listener functions doesn't get fired).

In the same cirumstances in IE8 the events get fired.

Yesterday after creating this question I experimented a little and it seems that suspendCheckChange works, but somehow "change" events on form fields get fired later than in other browsers - if I comment out the lines responsible for resuming events, they doesn't fire.

Right now I'm quite confused and can't frankly say that I'm sure why this happens.
Is it possible that in IE "change" events get fired with some latency, so that when they do the code I posted above already resumed them?

I will be grateful for any suggestions and help.