DOM Hiding Combobox using a select box producing an error

I think this is an IE specific problem…

I have a trigger action that when it happens it will display follow up combobox question (four in total) in a particular area.

However, the initialization of the four select boxes it will error out on the first one.

Using Select input box for the data.

Stating the following “Can’t move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus” combobox.js line 37 char 215

debugging in VS.NET it breaks here
b=c==null;if(a==this.getActualValue())return}this.DOMelem_input.focus();this.DOMelem_hidden_input.value=a;

If I take the wrapper

away. It works.

Now I could initialize them and try to then hide them. But I think that looks really bad, you have a flash of inputs and then they leave.

So, is there a proper way to initialize the control when it is wrapped in a

block?

An example from your samples with the combobox. All I did was take the select box example copy it gave new Id and then wrapped it in a div.

Sample File to use: dhtmlxCombo\dhtmlxCombo\samples\01_initialization\02_combo_init.html
dhtmlxCombo.zip (303 KB)

Solution to this is to modify the code and wrap the focus around a try block. You can’t test the styling because it is a parent element that is invisible.

So doing a try is the only way I found.

try { this.DOMelem_input.focus();} catch(err) { /do nothing/ }

This is a bug, that needs to be corrected. Hiding blocks of HTML is fairly common placed in any sophisticated web site.

Agree. We’ll necessary add your solution in Combo

Thanks )

Hi Alexandra, can you confirm that the fix was implemented?
Thanks. :slight_smile:

Hi,

it is not included in the current offiial build. However, the next version will include this modification.

Curious as to when the next release is planned?

The next release of dhtmlxSuite is planned for May

Hi Alex,
in which version of dhtmlx.js , that fix has been implemented.
currently we are using dhtmlx v3.0 , but didnt get that fix.

If we modify out dhtmlx.js as solution provided avobe , what would it impact on other functionality of dhtmlx?

Thanks