PDA

View Full Version : [NOREPRO] [EXT 4.2] Modal window bug



alexandrov
12 Apr 2013, 1:42 AM
Ext version tested:

Ext 4.2.1.744
Ext 4.2.0.663
Browser versions tested against:

Chrome 26.0.1410.65
Firefox 20 (firebug 1.11.2 installed)
Safari 6.0.3
Opera 12.14
Description:

I create a viewport and define 2 window. Then I made a button with handler. This handler opens win1. In win1 I made a grid with handler. This handler opens win2.
It works with Ext 4.1.x
It failed with Ext 4.2.x
Steps to reproduce the problem:

Open http://www.ismsys.ru/win.html
Click "open win"
Check some row
The result that was expected:

Second modal window should open on top
The result that occurs instead:

Second modal window opens behind
Test Case:


Ext.onReady(function(){
Ext.create('Ext.container.Viewport',{


layout: 'fit',


items: [{
xtype: 'panel',
dockedItems:[{
xtype: 'toolbar',
items:[{
text:'open win',
scope:this,
handler:function(){
var win = Ext.create('win1',{});
win.show();
console.log('check some row')
}
}]
}]
}]
});

console.log('open a window')
},this);


Ext.define('win1',{
extend:'Ext.Window',

width:600,
height:400,
border:false,
modal:true,
layout:'fit',

title:'check some row',

initComponent:function()
{
var win = this;
this.items = [{
xtype:'grid',
store:Ext.create('Ext.data.Store',{
fields: [
{name: 'id', type: 'int'},
{name: 'title', type: 'string'}
],
data:[{
id:1,
title:'title 1'
},{
id:2,
title:'title 2'
},{
id:3,
title:'title 3'
}]
}),
columns: [{
dataIndex:'title',
flex:1
}],
selModel:Ext.create('Ext.selection.CheckboxModel',{
showHeaderCheckbox:false
}),
listeners:{
scope:this,
select:this.openNextWin
}
}];

this.dockedItems = [{
xtype: 'toolbar',
dock: 'bottom',
ui: 'footer',
defaults: {minWidth: 75},
items: [{
text:'Close',
scope:this,
handler:this.close
}]
}];

this.callParent(arguments);
},
openNextWin:function(sm, smthelse)
{
var win = Ext.create('win2',{});
win.show();
console.log('!!!! why did it appear behind the window? !!!!')
}
});
Ext.define('win2',{
extend:'Ext.Window',

width:400,
height:600,
modal:true,

title:'Why did it appear behind?',

initComponent:function()
{
this.dockedItems = [{
xtype: 'toolbar',
dock: 'bottom',
ui: 'footer',
defaults: {minWidth: 75},
items: [{
text:'Close',
scope:this,
handler:this.close
}]
}];

this.callParent(arguments);
}
});


HELPFUL INFORMATION

See this URL for live test case:

http://www.ismsys.ru/win.html
Additional CSS used:

only default ext-all.css
Operating System:

OS X 10.8.3

slemmon
12 Apr 2013, 8:36 AM
Thanks for the report! I have opened a bug in our bug tracker.

alexandrov
31 Jul 2013, 10:09 AM
In ext-4.2.2-941 (ext-4.2.2-20130730-beta) this bug wasn't fixed. When will be fixed?

zolta.szekely
14 Jan 2014, 3:15 AM
Workaround works, but we need a fix for this bug at the framework level.