PDA

View Full Version : [FIXED-1463] shadowOffset is undefined in Ext.Window



gaellafond
15 Dec 2010, 8:18 PM
I have a window, configured with shadow: true and constrainHeader: true (also occur with constrain: true). When I resize the browser window, the constrain do not occur, so I can lose the Ext window.

The bug do not occur when I set shadow: false, or when I have 2 windows (the shadow only occur on the active window, so the other one have the constrain works correctly)

I try to find where in the library this variable get wiped, but I could not find it. I think it's in Panel, in the makeFloating (it set the shadowOffset to this.shadowOffset, which seems to be undefined :-/).


Found it!
It's in Ext.Layer.enableShadow().
this.shadowOffset = this.lastShadowOffset;
this.lastShadowOffset is not defined the first time the shadow is enabled. This can be solved by replacing the line by:
if (Ext.isDefined(this.lastShadowOffset)) this.shadowOffset = this.lastShadowOffset;

Also, when the window is constrain to it's header, the shadow should not be counted. An easy fix for this:
In Ext.Window.doConstrain()
Replace the line:
bottom:-(s.height - 25)
by
bottom:-(s.height - 25 + this.el.getConstrainOffset())


Thanks

Gael

ExtJS: 3.3.0

meroy
20 Dec 2010, 2:47 PM
Thanks for the report.