Opened 11 years ago
Closed 10 years ago
#11515 closed defect (worksforme)
Error in IE7 in dojo.coords when passed hidden image
Reported by: | grimmy102 | Owned by: | anonymous |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Core | Version: | 1.4.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
In dojo._getMarginExtents, "s" in the following code is being returned as null. gcs is NOT null, so it is the method which is executed. "n" is an image tag for an image which exists, but is currently inside a hidden DIV (display:none). Since "s" is null, the first call to px throws an exception.
I have opened this bug as "blocker" as it is preventing me from moving forward on IE7.
var s = computedStyle||gcs(n), l = px(n, s.marginLeft), t = px(n, s.marginTop), r = px(n, s.marginRight), b = px(n, s.marginBottom); if(d.isWebKit && (s.position != "absolute")){ // FIXME: Safari's version of the computed right margin // is the space between our right edge and the right edge // of our offsetParent. // What we are looking for is the actual margin value as // determined by CSS. // Hack solution is to assume left/right margins are the same. r = l; } return { l: l, t: t, w: l+r, h: t+b };
Attachments (1)
Change History (3)
comment:1 Changed 10 years ago by
Description: | modified (diff) |
---|---|
Priority: | high → normal |
Changed 10 years ago by
working test case, run from dijit/tests (or dojo/tests)
comment:2 Changed 10 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
I'm not sure what return value you are expecting/hoping for. A hidden image (or hidden anything) doesn't have a position and arguably doesn't have a size.
But anyway, I tried to test this on IE7 and it's working fine for me, in 1.3, 1.4, 1.5, and trunk. I'll attach my test case. If you have a test case that fails please attach it.