PDA

View Full Version : [FNR] SlideIn - Wrapper size too big in IE 8 after slide out



Trelmo
1 Sep 2010, 7:37 AM
GXT 2.2.0
Windows Vista
IE 8

When sliding in with Direction.DOWN the bounds are calculated at nearly twice the size of the wrapped node. This seems to be related to the fact that IE 8 is including the top margin changes generated by the SlideOut, Direction.UP FX during the bounds calculation in onStart().

The behavior can be corrected by clearing the top margin of the wrapped element after it has been hidden. The following code change corrects the problem. Starting line 313 of com.extjs.gxt.ui.client.fx.BaseEffect replace:


public void onComplete() {
el.setVisible(false);
wrapEl.unwrap(el.dom, oBounds);
el.setStyleAttribute("overflow", overflow);
super.onComplete();
}with:


public void onComplete()
{
el.setVisible(false);
wrapEl.unwrap(el.dom, oBounds);
el.setStyleAttribute("overflow", overflow);
switch (dir)
{
case UP :
el.setStyleAttribute("marginTop", "0px");
break;
}
super.onComplete();
}

sven
1 Sep 2010, 7:45 AM
When posting code, can you please always also post a etstcase or explain in detail how to reproduce this? This would be extremly helpfull

sven
1 Sep 2010, 7:50 AM
I fixed these. It uses the real margin from before the the slide instead of 0.

sven
1 Sep 2010, 8:01 AM
Fixed in SVN as of revision 2112.

Trelmo
1 Sep 2010, 8:01 AM
Thanks for the quick response sven. And yes, I'll try to be more descriptive going forward.