PDA

View Full Version : The message window hides behind the panel



disller
2 Oct 2012, 8:04 PM
Ext 4.1.0/4.1.1

The message window hides behind the panel when click Tab on Editable cell.


Ext.onReady(function(){

var tablePanel = new Ext.Window({
title : null,
renderTo: Ext.getBody(),
width: 1000,
modal:true,
layout: 'fit',
height: 400,
defaults:{frame: false}
});


Ext.create('Ext.data.Store', {
storeId:'simpsonsStore',
fields:['name', 'email', 'phone'],
data:{'items':[
{ 'name': 'Lisa', "email":"[email protected]", "phone":"1224" },
{ 'name': 'Bart', "email":"[email protected]", "phone":"1234" },
{ 'name': 'Homer', "email":"[email protected]", "phone":"1244" },
{ 'name': 'Marge', "email":"[email protected]", "phone":"1254" }
]},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});

var table = Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns: [
{ text: 'Name', dataIndex: 'name',editor:{xtype:'textfield'} },
{ text: 'Email', dataIndex: 'email', flex: 1 },
{ text: 'Phone', dataIndex: 'phone',editor:{xtype:'numberfield',hideTrigger: true,validateOnChange : false} }
],
height: 200,
width: 400,
plugins:[ Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 2
})],
listeners:{
'validateedit':function(){
Ext.MessageBox.show({
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
title: 'test',
msg: 'test'
});
}
}
});
tablePanel.add(table);
tablePanel.show();

});

disller
4 Oct 2012, 2:50 PM
I think it is a real problem.

scottmartin
5 Oct 2012, 5:53 AM
I see it does not do this in 4.07, but in 4.1. I will talk with dev team.

For now, you can use defer:



listeners:{
'validateedit':function(){
Ext.MessageBox.show({
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
title: 'test',
msg: 'test'
}).defer(100);
}
}


Scott.