PDA

View Full Version : IE ComboBox problem



mshepherd
4 Oct 2010, 7:24 AM
In my app I have a button that opens a form nested in a ext window. Sometimes the combobox won't expand in IE. I have tested it in IE6 and IE8. One way to make it break is to click a button that opens a second ext window. Anyone have any ideas how to fix this?

mshepherd
4 Oct 2010, 7:50 AM
I have posted a video displaying the problem:

http://www.mattshepherd.us/problem.zip

troseberry
4 Oct 2010, 11:16 AM
have you added this to your combo's config ?

triggerAction: 'all'

mshepherd
4 Oct 2010, 11:36 AM
Yes, this only happens in IE.

troseberry
5 Oct 2010, 5:03 AM
perhaps you can share the code for the combo

mshepherd
5 Oct 2010, 7:36 AM
new Ext.form.ComboBox({
fieldLabel: 'Department',
id: 'departmentbox',
hiddenName:'approver',
store: approverSubmitStore,
valueField:'id',
displayField:'department',
typeAhead: true,
minChars: 2,
mode: 'local',
triggerAction: 'all',
emptyText:'Select a department...',
selectOnFocus:true,
allowBlank: false,
forceSelection: true,
blankText:"Please select a department",
anchor: '0'
})

Condor
6 Oct 2010, 2:14 AM
1. Do you have multiple instances of this combobox?

In that case you should add:

hiddenId: Ext.id()

2. Is this combobox on a window? Ext 3.2 sometimes has a z-index bug on the dropdown (showing it behind the window instead of in front - search the Bugs section for a patch).

mshepherd
7 Oct 2010, 7:19 AM
OK, it looks like the same problem found in this thread (http://www.sencha.com/forum/showthread.php?94095-CLOSED-Window-amp-Combo-Box-issue-(Firefox-amp-IE)), but I can't find those files they are talking about anywhere in the ext directory:

troseberry
7 Oct 2010, 7:24 AM
It appears they are refrencing a User Extension called Superbox which is not what your using. Perhaps the problem is that when you window is closing you are actually closing it instead of hiding it and its destroying objects that are needed like your combo's store. Perhaps you can share little bit more code

mshepherd
7 Oct 2010, 8:34 AM
Ok, it was definately a z-index bug. I added a listener for the expand event and increased the z-index of the combo drop down list. this solved the problem.

new Ext.form.ComboBox({
fieldLabel: 'Department',
id: 'departmentbox',
hiddenName:'approver',
store: approverSubmitStore,
valueField:'id',
displayField:'department',
typeAhead: true,
minChars: 2,
mode: 'local',
triggerAction: 'all',
listeners:{
expand:function(theComboBox){
var comboZ = parseInt(requestWindow.getEl().getStyle("z-index"));
theComboBox.list.setZIndex(comboZ + 10);
}
},
emptyText:'Select a department...',
selectOnFocus:true,
allowBlank: false,
forceSelection: true,
blankText:"Please select a department",
anchor: '0'
})