Bug Tracker

Opened 16 years ago

Closed 15 years ago

#1036 closed bug (wontfix)

iutils getPositionLite fails with position:fixed

Reported by: bluej Owned by: stefan
Priority: major Milestone: 1.1.3
Component: interface Version: 1.1.1
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by scott.gonzal)

For elements that are or descent from elements that are position:fixed, getPositionLite returns the values they would have if they were position:absolute. I believe this is also true of getPosition itself.

Here is a fix that's working for me:

getPositionLite : function(el)


var x = 0, y = 0; var fixed; while(el) {

if (jQuery(el).css('position') == 'fixed') {

fixed = true;


x += el.offsetLeft y += el.offsetTop

el = el.offsetParent;

} if (fixed) {

if (window.pageXOffset != null) {

x += window.pageXOffset; y += window.pageYOffset;

} else {

x += document.body.scrollLeft; y += document.body.scrollTop;


} return {x:x, y:y};


This patch solves the position:fixed problems with idrop.js.

Change History (1)

comment:1 Changed 15 years ago by scott.gonzal

Description: modified (diff)
need: Review
Resolution: wontfix
Status: newclosed

Interface is no longer supported; consider switching to jQuery UI.

Note: See TracTickets for help on using tickets.