Skip to main content

Bug Tracker

Side navigation

#3037 closed bug (wontfix)

Opened June 13, 2008 02:45PM UTC

Closed March 17, 2009 09:11PM UTC

Last modified January 14, 2014 04:06PM UTC

offset returns top/left = 0 for a position: absolute / display: none div element

Reported by: epsilon68 Owned by: brandon
Priority: undecided Milestone: 1.3
Component: offset Version: 1.2.6
Keywords: offset display none Cc:
Blocked by: Blocking:
Description

Offset returns a top / left = 0 for my div that is in position absolute and in display none.

this is blocking me to switch completely from Interface to jQuery-UI

I need to have the transfer between a displayed element to another one not yet visible, fade in after the transfer effect.

Many thanks in advance for your help

and thanks a million for your work !!!

Cheers,

Sylvain Pointeau

Attachments (1)
  • offset.html (1.0 KB) - added by epsilon68 June 16, 2008 09:18PM UTC.

    test case

Change History (5)

Changed November 22, 2008 12:29PM UTC by epsilon68 comment:1

Any feedback? someone is working on it? How can I help you?

Changed January 07, 2009 03:28AM UTC by dmethvin comment:2

resolution: → wontfix
status: newclosed

http://docs.jquery.com/CSS/offset

"The method works only with visible elements."

You could set display:block before calling offset() though.

Changed January 07, 2009 04:44AM UTC by dmethvin comment:3

resolution: wontfix
status: closedreopened

Actually, I'll reopen this and let brandon or others weigh in on whether removing this limit is practical.

Changed March 17, 2009 09:11PM UTC by brandon comment:4

resolution: → wontfix
status: reopenedclosed

Checking to see if the element is hidden is to much overhead for an already costly method. We would just be setting it's display to block (like interface was doing) before calculating offset. Just call .show().offset().

Changed January 14, 2014 04:06PM UTC by estaples comment:5

Replying to [comment:4 brandon]:

Checking to see if the element is hidden is to much overhead for an already costly method. We would just be setting it's display to block (like interface was doing) before calculating offset. Just call .show().offset().

Thanks for sharing that workaround. This issue was kicking my behind!