suntoast
3 Oct 2007, 8:07 AM
Info:
- Ext 2.0a1 (we noticed the issue in the first release of Ext2 into svn)
- prototype adapter
- ie6
I can't show you a way to reproduce this, but it happens when the grid panel is hidden, and it only happens in IE, so it's hard to do a stack trace.
For some reason c.getSize(true) is returning a width of -2, which IE can't handle.
The second problem is that sometimes this.innerHd was not set, so i added a test for that.
See below.
Ext.extend(Ext.grid.GridView, Ext.util.Observable, {
...
, layout : function(){
if(!this.mainBody){
return; // not rendered
}
var g = this.grid;
var c = g.getGridEl(), cm = this.cm,
expandCol = g.autoExpandColumn,
gv = this;
var csize = c.getSize(true);
var vw = csize.width;
// another problem in IE - negative vw
if(!vw || !csize.height || vw < 0){ // display: none?
return;
}
if(g.autoHeight){
this.scroller.dom.style.overflow = 'visible';
}else{
this.el.setSize(csize.width, csize.height);
var hdHeight = this.mainHd.getHeight();
var vh = csize.height - (hdHeight);
this.scroller.setSize(vw, vh);
// source of many IE related problems
if (this.innerHd)
this.innerHd.style.width = (vw)+'px';
}
if(this.forceFit){
if(this.lastViewWidth != vw){
this.fitColumns(false, false);
this.lastViewWidth = vw;
}
}else {
this.autoExpand();
}
this.onLayout(vw, vh);
}
...
}
- Ext 2.0a1 (we noticed the issue in the first release of Ext2 into svn)
- prototype adapter
- ie6
I can't show you a way to reproduce this, but it happens when the grid panel is hidden, and it only happens in IE, so it's hard to do a stack trace.
For some reason c.getSize(true) is returning a width of -2, which IE can't handle.
The second problem is that sometimes this.innerHd was not set, so i added a test for that.
See below.
Ext.extend(Ext.grid.GridView, Ext.util.Observable, {
...
, layout : function(){
if(!this.mainBody){
return; // not rendered
}
var g = this.grid;
var c = g.getGridEl(), cm = this.cm,
expandCol = g.autoExpandColumn,
gv = this;
var csize = c.getSize(true);
var vw = csize.width;
// another problem in IE - negative vw
if(!vw || !csize.height || vw < 0){ // display: none?
return;
}
if(g.autoHeight){
this.scroller.dom.style.overflow = 'visible';
}else{
this.el.setSize(csize.width, csize.height);
var hdHeight = this.mainHd.getHeight();
var vh = csize.height - (hdHeight);
this.scroller.setSize(vw, vh);
// source of many IE related problems
if (this.innerHd)
this.innerHd.style.width = (vw)+'px';
}
if(this.forceFit){
if(this.lastViewWidth != vw){
this.fitColumns(false, false);
this.lastViewWidth = vw;
}
}else {
this.autoExpand();
}
this.onLayout(vw, vh);
}
...
}