ComboBox Events difference 3.5 -> 4.3

Hi,

2 questions this time :slight_smile:

If I have a combobox with checkboxes I used to be able to show the choices (checked) directly into the combobox itself.
Like this :

var self = this;
this.object.attachEvent(‘onCheck’ , function(value,state) { self.object.setComboValue(self.object.getChecked());
return true;
});

In 4.3 however this doesn’t seem to work like this…
Whenever I check or uncheck a value the getChecked() method returns the previous state.

So if I have three choices A,B and C and I check A then getChecked() returns an empty array.
If I check B then I get an array with only A.
If I uncheck A then I get an array with A and B.

It seems I cannot (reliably) get the checked items anymore within the onCheck handler.
Even from within another handler (i.e. onClose) it’s not always updating it right.

Att. a demo of this behaviour.
Included the sources as found in the 4.3 suite download for combobox.

Another thing that is different is the handling of RMB.
I’ve setup the combobox so that RMB shows a context-menu.
In 3.5 this works flawlessly :
LMB opens the combobox
RMB shows my context-menu
In 4.3 RMB shows the context-menu but it ALSO opens the dropdown in the combobox !

How can I change that behaviour ?

TVMIA for looking into this !
rg,rg
ComboBox_getChecked_weirdness.zip (39.3 KB)

Hi

please try attached update
dhtmlxcombo_upd.zip (15.4 KB)

Hi,

The update .js seems to solve the issues I mentioned.

I’ve got a couple of more questions but will log them separately.

Thx. very much for this fix !
I suppose it will be merged in the suite.

rg,rg