#3891 closed defect (fixed)
TitlePane/fx.wipeOut() fail because dojo.style(node, "height") returns 0 (IE)
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | fx | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
See test_TitlePane.html on IE; each pane closes instantly rather than wiping closed, because dojo/_base/fx.js calls
prop.start = dojo.style(this.node, p);
(where p=="height"), which returns 0, even though the node is visible. Node has style.cssText="height: auto".
So, something has to be updated, either html.js, _base/fx.js, dojo/fx.js, or TitlePane.js. Seems like the problem is in html.js but I guess it's debatable?
Change History (8)
comment:1 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Summary: | dojo.html(node, "height") returns 0 for visible node with height: auto (IE) → dojo.style(node, "height") returns 0 for visible node with height: auto (IE) |
comment:2 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:3 Changed 13 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
We need to change some code before this ticket can be closed. If we don't change dojo.html, the alternative is to modify fx to special case height (and width, I guess) when getting a style.
comment:4 Changed 13 years ago by
I always consider the title of the ticket to state it's objective. As stated, this ticket is not a valid bug. I imagined you would open a new ticket for the fx problem.
comment:5 Changed 13 years ago by
Component: | HTML → fx |
---|---|
Owner: | changed from sjmiles to bill |
Status: | reopened → new |
Summary: | dojo.style(node, "height") returns 0 for visible node with height: auto (IE) → TitlePane/fx.wipeOut() fail because dojo.style(node, "height") returns 0 (IE) |
OK, I'm uneasy about dojo.html() have browser specific behavior but I'll add workaround code into fx for now.
comment:6 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:7 Changed 13 years ago by
This change probably will cause additional problems because node.style.height and offsetHeight are not always symmetrical (depending on box-model, borders, and padding).
comment:8 Changed 13 years ago by
That's true, but in general height/width related animation won't work on nodes that have border/padding/margin, because of those box-model differences. Maybe it should be browser specific code, only accessing offsetHeight for IE.
dojo.style uses getComputedStyle.
Querying computedStyle.height is not a good idea to get the actual node height. In particular, on IE the computedStyle is still just "auto"
You should use a box method or simply node.offsetHeight.