PDA

View Full Version : [FIXED-1489] Bug in LockingGridView.js when runs with MS IE (With Solution)



Liveinlow
7 Jan 2011, 2:25 AM
The method "setHidden" will be failed due to the fact that the height cannot be negative, (Line: 837, "vh" will be negative). Therefore, make sure "vh" always be zero or positive would solve this problem.

Original:
if(!this.grid.autoHeight){
var vh = (csize.height - this.mainHd.getHeight()) + 'px';
this.lockedScroller.dom.style.height = vh;
this.scroller.dom.style.height = vh;
}

Rewrite:
if(!this.grid.autoHeight){
var vh = (csize.height - this.mainHd.getHeight());
vh = vh <= 0 ? 0 : vh;
vh += 'px';
this.lockedScroller.dom.style.height = vh;
this.scroller.dom.style.height = vh;
}


:))

Condor
7 Jan 2011, 3:04 AM
Easier:

var vh = Math.max(csize.height - this.mainHd.getHeight(), 0) + 'px';

meroy
7 Jan 2011, 11:25 AM
This has been fixed in SVN (3.3.x branch).