solodesignz
31 Aug 2012, 1:11 PM
So, I have dumbed down the EXT code to see if this was being caused by something else I was doing.
My goal is to have one column in a grid that for some records displays a textbox, and some other records display a combobox. This works great in FF/IE8+.
But, there seems to be a bug in IE7. The combobox renders correctly in the grid, but when clicking on it to open the dropdown, the dropdown displays at the top left of the browser. Like, the element that the dropdown belongs to is lost, to get it's coordinates.
Here's the code to reproduce using Ext 4.0.7:
<div id="grid-example"></div>
<script>
Ext.onReady(function () {
var grid = Ext.create('Ext.grid.Panel', {
store: Ext.create('Ext.data.ArrayStore', {
fields: [
{ name: 'title' }
],
data: [
['Item 1'],
['Item 2'],
['Item 3'],
['Item 4'],
['Item 5']
]
}),
stateful: true,
stateId: 'stateGrid',
singleClickExpand: true,
plugins: [Ext.create('Ext.grid.plugin.CellEditing', {
clicksToMoveEditor: 1,
clicksToEdit: 1,
autoCancel: false
})],
columns: [{
text: 'Title',
dataIndex: 'title',
flex: 1,
getEditor: function (record) {
Ext.define('State', {
extend: 'Ext.data.Model',
fields: [
{ type: 'string', name: 'title' }
]
});
return Ext.create('Ext.form.field.ComboBox', {
store: Ext.create('Ext.data.Store', {
model: 'State',
data: [
{ "title": "Test 1" },
{ "title": "Test 2" },
{ "title": "Test 3" }
]
}),
displayField: 'title',
queryMode: 'local',
typeAhead: true
});
}
}],
height: 350,
width: 600,
title: 'ComboBox Example',
renderTo: 'grid-example',
viewConfig: {
stripeRows: true
}
});
});
</script>
I know that this example doesn't dynamically change the editor, so technically I could just use "editor:" instead, and that does work. But, ultimately there is an if/else that changes the return value of the "getEditor".
Attached is a screenshot of the issue. Anyone know a workaround for this?
My goal is to have one column in a grid that for some records displays a textbox, and some other records display a combobox. This works great in FF/IE8+.
But, there seems to be a bug in IE7. The combobox renders correctly in the grid, but when clicking on it to open the dropdown, the dropdown displays at the top left of the browser. Like, the element that the dropdown belongs to is lost, to get it's coordinates.
Here's the code to reproduce using Ext 4.0.7:
<div id="grid-example"></div>
<script>
Ext.onReady(function () {
var grid = Ext.create('Ext.grid.Panel', {
store: Ext.create('Ext.data.ArrayStore', {
fields: [
{ name: 'title' }
],
data: [
['Item 1'],
['Item 2'],
['Item 3'],
['Item 4'],
['Item 5']
]
}),
stateful: true,
stateId: 'stateGrid',
singleClickExpand: true,
plugins: [Ext.create('Ext.grid.plugin.CellEditing', {
clicksToMoveEditor: 1,
clicksToEdit: 1,
autoCancel: false
})],
columns: [{
text: 'Title',
dataIndex: 'title',
flex: 1,
getEditor: function (record) {
Ext.define('State', {
extend: 'Ext.data.Model',
fields: [
{ type: 'string', name: 'title' }
]
});
return Ext.create('Ext.form.field.ComboBox', {
store: Ext.create('Ext.data.Store', {
model: 'State',
data: [
{ "title": "Test 1" },
{ "title": "Test 2" },
{ "title": "Test 3" }
]
}),
displayField: 'title',
queryMode: 'local',
typeAhead: true
});
}
}],
height: 350,
width: 600,
title: 'ComboBox Example',
renderTo: 'grid-example',
viewConfig: {
stripeRows: true
}
});
});
</script>
I know that this example doesn't dynamically change the editor, so technically I could just use "editor:" instead, and that does work. But, ultimately there is an if/else that changes the return value of the "getEditor".
Attached is a screenshot of the issue. Anyone know a workaround for this?