Skip to main content

Bug Tracker

Side navigation

#2273 closed bug (fixed)

Opened February 02, 2008 11:23PM UTC

Closed April 22, 2009 12:56AM UTC

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:
Description

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.

Attachments (0)
Change History (3)

Changed February 17, 2008 06:35PM UTC by brandon comment:1

need: ReviewTest Case
owner: → brandon

Changed March 17, 2009 11:05PM UTC by brandon comment:2

component: coredimensions

Changed April 22, 2009 12:56AM UTC by brandon comment:3

milestone: 1.2.31.3.3
resolution: → fixed
status: newclosed

fixed in r6313