It could be a bug in my code but I doubt it… I am finding that under the following circumstance you can edit the value in the combo box with out it being detected. Same behavior in ie8 and ff 3.6
Say you have an editable combo box with one entry.
Select that entry. Ex. SELECTION1
Now place the cursor after the first character in the selection, the dropdown appears.
Type a few characters after the selection in combo Ex. SELECTION1AAAAAA
The dropdown is still visible, click anywhere on the dropdown but not on an actual selection, in other words the [b]white space in dropdown[/b].
Then when you click anywhere else on the page and the dropdown looses focus none of the following events fire:
onChange
onSelectionChange
onBlur
and you are left with a new value entered in the combobox that you have not detected the change
If anyone else has noticed this or knows of a fix it is of course much appreciated
I am using the lastest version of the code. I originally had an earlier version when I first saw this behavior and I downloaded the lastest version and it still functions the same.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Testing</title>
<link rel="STYLESHEET" type="text/css" href="codebase/dhtmlxcombo.css">
<script src="codebase/dhtmlxcommon.js"></script>
<script src="codebase/dhtmlxcombo.js"></script>
<script src="codebase/dhtmlxcombo_whp.js"></script>
</head>
<body>
<table border="0" >
<tr>
<td>
<select style="width:155px;" id="description" name="description" > </select>
</td>
<td width="50">
</td>
<td>
Set Focus on comboBox <br/>
Select option Three for example <br/>
Place cursor at end of text in combobox, Type some characters <br/>
Place cursor below all selections in dropdown and click <br/>
Click Arrow to close list <br/>
Place cursor on body of page and click <br/>
No Events fire (ie8 and ff 3.6 tested) <br/> <br/>
Thanks for your Help
</td>
</tr>
</table>
<script type="text/javascript">
window.dhx_globalImgPath="codebase/imgs/";
z=dhtmlXComboFromSelect("description");
z.enableFilteringMode(false);
z.addOption("1" ,"One");
z.addOption("2" ,"Two");
z.addOption("3" ,"Three");
z.attachEvent("onSelectionChange",descriptionChanged);
z.attachEvent("onChange",anyChange);
z.attachEvent("onBlur",anyBlur);
z.setOptionHeight(400);
function descriptionChanged(){
alert("descriptionChanged");
}
function anyChange(){
alert("anyChange");
}
function anyBlur(){
alert("onBlur");
}
</script>
</body>
</html>
We have reproduced the issue and modified the dhtmlxcombo.js - attached file. With this file the combo won’t lose focus when you click on an empty space of the list. dhtmlxcombo.zip (9.82 KB)