Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#4381 closed bug (invalid)

IE7 reports 'inherit' for visibility property - is(':visible') returns true

Reported by: Kwooda Owned by:
Priority: major Milestone: 1.4
Component: unfiled Version: 1.3.2
Keywords: css visibility inherit Cc:
Blocked by: Blocking:

Description

I have a div that is hidden, and inside that is an element that inherits the visibility from its parent. In IE7, using elem.css('visibility') returns "inherit" and an attempt to test elem.is(':visible') returns true even if the parent container is hidden (visibility:hidden).

What I would expect is that, for any property that results in 'inherit' as the value, that the parent hierarchy would be scanned to find the inherited value and return that. Firefox appears to do that automatically.

Change History (2)

comment:1 Changed 10 years ago by dmethvin

Resolution: invalid
Status: newclosed

The visibility and opacity css attributes don't factor into :visible, nor does the position of the element in the viewport.

http://docs.jquery.com/Selectors/visible

Element assumed as visible if it and its parents consumes space in document. CSS visibility isn't taken into account.

In essence, display:none, height:0 or width:0.

comment:2 Changed 8 years ago by anonymous

While visibility does not factor into the :visible selector, there is still a bug with jquery reporting "inherit" as the value when calling .css("visibility") for an element when it should report "visible". I am seeing this behavior in IE7/8

Note: See TracTickets for help on using tickets.