Bug Tracker

Opened 14 years ago

Closed 13 years ago

#6324 closed bug (invalid)

Sizzle reports link containing img is hidden in Webkit

Reported by: jeffkretz Owned by: jeffkretz
Priority: undecided Milestone:
Component: core Version: 1.4.2
Keywords: sizzle hidden webkit Cc:
Blocked by: Blocking:


This appears to be a bug releated to the Webkit rendering engine, as it exists in both Chrome and Safari.

Example page: http://test1.scorpiondesign.com/Visibility.html

Visited in IE678 and FF, it is detected as visible. In Safari/Chrome, it is not.

This is due to an underlying problem during the Sizzle.selectors.filters.hidden method, the elem.offsetWidth and elem.offsetHeight of the link is reported by the browser as 0, despite the contained image having dimensions.

It seems a bit ugly to test for this edge case, but I wanted to make sure it was known about.

Change History (4)

comment:1 Changed 13 years ago by addyosmani

Owner: set to jeffkretz
Priority: undecided
Status: newpending

The test case you provided is no longer available. Please supply a valid test case that reproduces the issue experienced in your ticket so that we can investigate further.

comment:2 Changed 13 years ago by jeffkretz

Status: pendingnew

I've restored the test page, give it another try.

comment:3 Changed 13 years ago by snover

Milestone: 1.4.3

Resetting milestone to future.

comment:4 Changed 13 years ago by snover

Resolution: invalid
Status: newclosed

Thanks for the report, but this is not a jQuery bug. You have placed a block-level element inside an inline-level element in a manner that is not valid. If you remove the display: block from the image, or add display: block to the anchor, it works as expected. test case

Note: See TracTickets for help on using tickets.