Opened 12 years ago

Closed 12 years ago

#2567 closed defect (duplicate)

src/lfx/html.js compresses to buggy code for dojo.lfx.html.wipeIn()

Reported by: tw@… Owned by: Bryan Forbes
Priority: high Milestone:
Component: lfx Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:

Description

src/lfx/html.js uses 'height' in dojo.lfx.html.wipeIn() as name for a variable which causes the compressor to produce the wrong code:

var height = dojo.html.getBorderBox(node).height;
...
with(node.style){
	overflow = oprop.overflow;
        height = oprop.height;
}

compresses to:

var _593=dojo.html.getBorderBox(node).height;
...
with(node.style){
overflow=_58f.overflow;
_593=_58f.height;
}

This causes lfx.wipeIn/wipeOut to grow the node on every invocation as the height is not adjusted correctly. TitlePane? widget is affected, probably others too...

proposed fix:

--- src/lfx/html.js.old Thu Mar  8 12:23:02 2007
+++ src/lfx/html.js     Thu Mar  8 12:33:24 2007
@@ -238,7 +238,7 @@
                        position = "absolute";
                        display = "";
                }
-               var height = dojo.html.getBorderBox(node).height;
+               var origHeight = dojo.html.getBorderBox(node).height;
                with (node.style) {
                        top = origTop;
                        left = origLeft;
@@ -246,7 +246,7 @@
                        display = "none";
                }
                var anim = dojo.lfx.propertyAnimation(node, {"height":{start:1, end:function () {
-                       return height;
+                       return origHeight;
                }}}, duration, easing);
                anim.connect("beforeBegin", function () {
                        oprop.overflow = node.style.overflow;

Change History (2)

comment:1 Changed 12 years ago by tw@…

Sorry for the noise, just discovered that this is a complete duplicate of #2489. I just searched for TitlePane? related tickets before submitting this one... Sorry again. Thomas

comment:2 Changed 12 years ago by Adam Peller

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.