Opened 16 years ago

Closed 16 years ago

#168 closed defect (fixed)

Bugs in dojo.html.getDocument{Width,Height} [patch]

Reported by: [email protected] Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.1
Keywords: Cc:
Blocked By: Blocking:


When the code for determing document width/height was moved from Dialog from dojo.html.getDocument{Width,Height}, the tests that were made changed, resulting in 0 width height in internet explorer.

Here's a patch that gets things working again; the logic is a combination of the older and newer versions:

  • Like the old version It doesn't use document.clientHeight or document.documentElement.clientHeight unless the value is present and non-zero.
  • Like the newer version, if both of the above are zero, it uses body.innerWidth.

I haven't done the research to comment on what browsers have which of these properties a) present b) width useful values, so I can't really comment whether this patch is the best possible way to do things, but it's definitely better than the current code.

Attachments (1)

dojo-documentsize.patch (1.6 KB) - added by [email protected] 16 years ago.

Download all attachments as: .zip

Change History (2)

comment:1 Changed 16 years ago by david

Resolution: fixed
Status: newclosed

(In [1860]) applied patched supplied by #168, fixes #168

Note: See TracTickets for help on using tickets.