Bug Tracker

Modify

Ticket #8564 (closed bug: invalid)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: eirikur@… Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5.1
Keywords: Cc:
Blocking: Blocked by:

Description

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

comment:1 Changed 2 years ago by dmethvin

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

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

 http://www.w3.org/TR/html401/struct/global.html#h-7.5.3

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.