Skip to main content

Bug Tracker

Side navigation

#1651 closed bug (fixed)

Opened September 17, 2007 04:13PM UTC

Closed September 18, 2007 01:24PM UTC

Last modified September 18, 2007 01:46PM UTC

obscure offset bug in IE

Reported by: wizzud Owned by:
Priority: major Milestone: 1.2.2
Component: core Version: 1.2
Keywords: offset Cc:
Blocked by: Blocking:
Description

The inclusion of an HTML element with an id of 'box' causes IE to fail in the offset method, reporting that "Object doesn't support this property or method" and relating to elem.getBoundingClientRect(). This is even though it has just passed a logic test for it!

The solution is to declare box locally, ie change

box = elem.getBoundingClientRect();

to

var box = elem.getBoundingClientRect();

The problem and solution can be seen demonstrated at

http://www.wizzud.com/tester/offset_quirks.html or http://www.wizzud.com/tester/offset_standard.html (quirks mode or standard mode respectively). Click 'fix #box bug' to run fixed code.

The demo is set up such that offset is called on the #box element itself, but it will still fail if #box exists anywhere on the page and offset() is called on any other element.

Attachments (0)
Change History (2)

Changed September 18, 2007 01:24PM UTC by brandon comment:1

resolution: → fixed
status: newclosed

This is now fixed in SVN.

Changed September 18, 2007 01:46PM UTC by brandon comment:2

milestone: 1.2.11.2.2