问题
I'm having an issue where I pop up a window with a loaded comboBox, and when I click on it, the fields show up behind the window.
Thinking I may be using some setting wrong, I created a small test based off the documentation of the ComboBox, and it does it here for me as well. (If you try it, may need to drag the bottom of the window up to see the options)
showTestWindow = function() {
var states = Ext.create('Ext.data.Store', {
fields: ['abbr', 'name'],
data : [
{"abbr":"AL", "name":"Alabama"},
{"abbr":"AK", "name":"Alaska"},
{"abbr":"AZ", "name":"Arizona"}
//...
]
});
var window = Ext.create('Ext.window.Window', {
width: 525,
height: 280,
items: [// Create the combo box, attached to the states data store
{
xtype: 'combobox',
fieldLabel: 'Choose State',
store: states,
queryMode: 'local',
displayField: 'name',
valueField: 'abbr'
}
]
}).show();
}
I created a JSFiddle, but it doesn't have the issue. http://jsfiddle.net/N9VUr/ (I assume something is different about the JSFiddle environment?)
I've tried this with both Firefox and Internet Explorer
Is this a Sencha bug, or am I doing something wrong? What's the easiest way to fix this?
Edit
Also, reassurance that it isn't just my local settings or something on my end would be appreciated if I could get someone else to test it as well.
Screenshot:

回答1:
The quickest solution if you rush for a fix is by adding css.
.x-combo-list{z-index:100000 !important;}
回答2:
The behavior you observe could be related to the fact that you create the combo before the window.
Use xtype to defer the creation of the checkbox to the rendering of the window.
var window = Ext.create('Ext.window.Window', {
width: 525,
height: 280,
items: [{
xtype: 'combobox',
fieldLabel: 'Choose State',
store: states,
queryMode: 'local',
displayField: 'name',
valueField: 'abbr'
}]
}).show();
回答3:
This issue might be caused by error in other block of code on current page. This opinion based on my own experience
来源:https://stackoverflow.com/questions/21102624/extjs-4-2-2-combobox-fields-show-up-behind-window