Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#759 closed bug (fixed)

Minor bug in getPosition method of Interface plugin.

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

Description

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')

Change History (2)

comment:1 Changed 13 years ago by brandon

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

comment:2 Changed 13 years ago by stefan

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.