Bug Tracker

Modify

Ticket #3037 (closed bug: wontfix)

Opened 5 years ago

Last modified 15 months ago

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:
Blocking: Blocked by:

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

offset.html Download (1.0 KB) - added by epsilon68 5 years ago.
test case

Change History

Changed 5 years ago by epsilon68

test case

comment:1 Changed 5 years ago by epsilon68

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

comment:2 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to wontfix

 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 4 years ago by dmethvin

  • Status changed from closed to reopened
  • Resolution wontfix deleted

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

comment:4 Changed 4 years ago by brandon

  • Status changed from reopened to closed
  • Resolution set to wontfix

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.