Skip to main content

Bug Tracker

Side navigation

#4381 closed bug (invalid)

Opened March 19, 2009 06:46AM UTC

Closed March 21, 2009 01:59AM UTC

Last modified July 29, 2011 03:37PM UTC

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.

Attachments (0)
Change History (2)

Changed March 21, 2009 01:59AM UTC by dmethvin comment:1

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
.

Changed July 29, 2011 03:37PM UTC by anonymous comment:2

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