PDA

View Full Version : [CLOSED] Window & Combo Box issue (Firefox & IE)



828
11 Mar 2010, 6:14 PM
Alright, so this is a strange bug. Basically, I open a window with a combo box in it and select an entry. I close that window then open up another one... close that window, then open the window with the combo box in it. I click on the trigger and the combo box menu hides behind the window.

Ext 3.1.1
Firefox 3.5
Internet Explorer 8

How to duplicate:
After the first window opens, select an item in the combo box
Close First Window
Click on the Open Second Window button
Close Second Window
Click on the Open First Window button
Click on Combo Box Trigger



Ext.BLANK_IMAGE_URL = '../sys_art/s.gif';

Ext.namespace('Test');

//create application
Test.WinTest = function () {

return {
firstBtn: new Ext.Button({
text: 'Open First Window'
}),
secondBtn: new Ext.Button({
text: 'Open Second Window'
}),
firstWin: new Ext.Window({
title: 'First Win',
layout: 'form',
baseCls: 'x-plain',
width: 500,
height: 400,
modal: true,
closeAction: 'hide',
resizable: false,
items: [{
xtype: 'combo',
anchor: '90%',
fieldLabel: 'Combo',
typeAhead: true,
triggerAction: 'all',
lazyRender: true,
mode: 'local',
store: new Ext.data.ArrayStore({
id: 0,
fields: ['myId', 'displayText'],
data: [
[1, 'item1'],
[2, 'item2']
]
}),
valueField: 'myId',
displayField: 'displayText'
}],
buttons: [{
text: 'Close',
scope: this,
handler: function () {
Test.WinTest.firstWin.hide()
}
}]
}),
secondWin: new Ext.Window({
title: 'Second Win',
baseCls: 'x-plain',
width: 500,
height: 400,
modal: true,
closeAction: 'hide',
resizable: false,
html: 'Second Window',
buttons: [{
text: 'Close',
scope: this,
handler: function () {
Test.WinTest.secondWin.hide();
}
}]
}),
init: function () {
this.firstBtn.on({
scope: this,
click: function () {
this.firstWin.show();
}
});
this.secondBtn.on({
scope: this,
click: function () {
this.secondWin.show();
}
});
this.firstBtn.render('firstBtn');
this.secondBtn.render('secondBtn');
this.firstWin.show();
}
}

}();
//end of app

Ext.onReady(Test.WinTest.init, Test.WinTest);
// end of file
Please let me know what I can do.

squ3lch
12 Mar 2010, 6:04 AM
I do believe this is fixed in 3.1.2.

Jamie Avins
12 Mar 2010, 9:16 AM
Indeed it was fixed in 3.1.2 or newer.

828
12 Mar 2010, 10:15 AM
Thanks... couldn't find the listing anywhere.

susan_morri
12 Mar 2010, 4:10 PM
I have the same problem with 3.1.1
is there any solution available in 3.1.1?

mystix
14 Mar 2010, 2:45 AM
I have the same problem with 3.1.1
is there any solution available in 3.1.1?

3.2-beta is publicly available. use that instead.

susan_morri
14 Mar 2010, 1:15 PM
Please do you can provide us with the link to download 3.2 beta?

mystix
15 Mar 2010, 3:25 AM
it's in an announcement right at the top of this forum:

http://grab.by/349p

828
15 Mar 2010, 7:59 AM
Doesn't seem to be fixed in 3.2 Beta.

mystix
23 Mar 2010, 6:01 PM
[ bump ] and [ REOPENED ] in light of @828's comment.

828
24 Mar 2010, 3:04 AM
Well, the combobox seems to be fine... it's the superboxselect. What changes were made to the combobox so I can apply to the superboxselect.

828
24 Mar 2010, 3:20 AM
I am assuming, this is the culprit:



getParentZIndex: function () {
var zindex;
if (this.ownerCt) {
this.findParentBy(function (ct) {
zindex = parseInt(ct.getPositionEl().getStyle('z-index'), 10);
return !!zindex;
});
}
return zindex;
},

// initList FUNCTION

var cls = 'x-combo-list',
listParent = Ext.getDom(this.getListParent() || Ext.getBody()),
zindex = parseInt(Ext.fly(listParent).getStyle('z-index'), 10);
if (!zindex) {
zindex = this.getParentZIndex();
}
this.list = new Ext.Layer({
parentEl: listParent,
shadow: this.shadow,
cls: [cls, this.listClass].join(' '),
constrain: false,
zindex: (zindex || 12000) + 5
});

Jamie Avins
24 Mar 2010, 8:02 AM
Yes, it looks like the UX will need to be updated to handle the zindex.

Stju
10 May 2010, 9:28 PM
Have You had a chance to fix suberboxselect?
I have the same problem..

828
20 May 2010, 8:04 AM
I just edited the expand method in the superbox.js file to be similar to the expand method in the combobox.js file:



var listParent = Ext.getDom(this.getListParent() || Ext.getBody()),
zindex = parseInt(Ext.fly(listParent).getStyle('z-index'), 10);
if (!zindex) {
zindex = this.getParentZIndex();
}
if(zindex){
this.list.setZIndex(zindex + 5);
}

Stju
20 May 2010, 3:12 PM
Thank's! That solved =D>