#759 closed bug (fixed)
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: |
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 16 years ago by
comment:2 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Stefan, feel free to grab the .offset() method in the dimensions plugin and use it. It takes care of this issue and several others.