Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 6 years ago

#3037 closed bug (wontfix)

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 11 years ago.
test case

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by epsilon68

Attachment: offset.html added

test case

comment:1 Changed 11 years ago by epsilon68

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

comment:2 Changed 11 years ago by dmethvin

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.

comment:3 Changed 11 years ago by dmethvin

Resolution: wontfix
Status: closedreopened

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

comment:4 Changed 11 years ago by brandon

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().

comment:5 in reply to:  4 Changed 6 years ago by estaples

Replying to 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!

Note: See TracTickets for help on using tickets.