PDA

View Full Version : How to properly destroy a combobox?



mx_starter
21 Oct 2013, 1:09 AM
Hi, i'm facing a strange error when destroying a combobox:
when calling a destroy() method, the combo itself is being destroyed, but the console shows the following error message:


TypeError: me.inputEl is null
me.inputEl.focus();


the error appears @ ext-all-debug-w-comments.js, line 139344, Ext is 4.2.1

My purpose was to destroy the combo via a select event handler and in fact this happens as expected except for the error above.

Any ideas?

ettavolt
21 Oct 2013, 1:38 AM
You are destroying combo while it is being processing some user input (click on an option, I believe). I wouldn't expect things to work right in such scenario.

mx_starter
21 Oct 2013, 2:05 AM
You are destroying combo while it is being processing some user input (click on an option, I believe). I wouldn't expect things to work right in such scenario.

Yeah,


Ext.defer(function(){ combo.destroy() }, 1);

solved the problem as usual :)