Skip to main content

Bug Tracker

Side navigation

#759 closed bug (fixed)

Opened January 06, 2007 11:58PM UTC

Closed January 20, 2007 08:48AM UTC

Last modified June 20, 2007 02:48AM UTC

Minor bug in getPosition method of Interface plugin.

Reported by: Owned by: stefan
Priority: minor Milestone:
Component: interface Version:
Keywords: getPosition Cc:
Blocked by: Blocking:

Part of the getPosition function walks up the DOM to the body element to get the scroll position of the page.

while (el && el.tagName.toLowerCase() != 'body')

I had a situation whereby a parent element had no tag, and this method threw an exception. I suggest this implementation which solves the issue:

while (el && el.tagName && el.tagName.toLowerCase() != 'body')

Attachments (0)
Change History (2)

Changed January 09, 2007 03:34AM UTC by brandon comment:1

Stefan, feel free to grab the .offset() method in the dimensions plugin and use it. It takes care of this issue and several others.

Changed January 20, 2007 08:48AM UTC by stefan comment:2

resolution: → fixed
status: newclosed