Bug Tracker

Opened 12 years ago

Closed 12 years ago

#8564 closed bug (invalid)

Visible/hidden selectors fail for inline elements that contain a block element

Reported by: [email protected] Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:


Test case: http://jsbin.com/axeyi5/5/edit

Happens in:

  • jQuery 1.4.4, jQuery 1.5.1, jQuery latest/git
  • Webkit (Chrome stable, Safari stable)

Abstract: Visible/hidden selectors fail in Webkit for inline elements that contain a block element. It reports the inline element having 0,0 offsetDimensions, which jQuery uses to detect visibility.

Affects: The "visible" utility in jquery UI core and all dependencies of it (f.ex. :focused, :tabbable) are affected. Since it walks up the whole tree and checks each element if its visible, a whole branch can stop working if one element is inline containing a block.

Disclosure: I know it may not be recommended practice to have block elements inside inline elements, but sometimes it is necessary.

Change History (1)

comment:1 Changed 12 years ago by dmethvin

Resolution: invalid
Status: newclosed

Inline elements CANNOT contain block elements, so the document is invalid and the browser behavior for that case isn't defined by standard.


Note: See TracTickets for help on using tickets.