Bug Tracker

Opened 16 years ago

Closed 14 years ago

#2273 closed bug (fixed)

Other windows and documents

Reported by: flesler Owned by: brandon
Priority: major Milestone: 1.4
Component: dimensions Version: 1.2.2
Keywords: Cc:
Blocked by: Blocking:


When the functions height and width are generated, since line 1325, source release. this[0] is compared against 'window' and 'document', that detection leaves out any other window and document that might be evaluated. These might come from an iframe, a popup, etc. My suggestion is to use object detection instead. It'll certainly look less clear, but will cover these cases.

I came up with an option for detection which is: windows: if( elem.scrollBy ).... documents: if( elem.nodeName == '#document' )......

Of course this also requires that if a window is detected, elem.document is used and not that document. If a document is detected, elem.body and elem.documentElement are used instead.

This checks are just an example, maybe someone can come up with more reliable ones.

Change History (3)

comment:1 Changed 16 years ago by brandon

need: ReviewTest Case
Owner: set to brandon

comment:2 Changed 15 years ago by brandon

Component: coredimensions

comment:3 Changed 14 years ago by brandon

Resolution: fixed
Status: newclosed

fixed in r6313

Note: See TracTickets for help on using tickets.