Skip to main content

Bug Tracker

Side navigation

#6714 closed enhancement (patchwelcome)

Opened June 23, 2010 09:46PM UTC

Closed April 16, 2011 09:40PM UTC

css display property of table row returns undefined

Reported by: sdoony Owned by:
Priority: low Milestone:
Component: css Version: 1.4.2
Keywords: IE css undefined Cc:
Blocked by: Blocking:

example: $('<tr></tr>').css('display'); returns undefined in a previous version of jquery 'block' was returned. Tested this with IE 8.

Attachments (0)
Change History (7)

Changed June 25, 2010 01:35AM UTC by dmethvin comment:1

In IE8,

returns an empty string. The default display type of a tr is implicitly
. Seems like display should return an empty string rather than undefined.

Changed June 25, 2010 01:36AM UTC by dmethvin comment:2

component: unfiledcss
summary: IE Bug with csscss display property of table row returns undefined

Changed November 03, 2010 05:24AM UTC by boushley comment:3

Here is a fiddle displaying the behavior described However, I think the issue has more to do with the fact that the element isn't added to the DOM yet and so we're not quite sure on what the display property is at this point. I think returning an empty string is perfectly valid for an element that's been created an not added to the DOM.

The fiddle also shows that the behavior is similar to that of a div element, and so there is no special case happening here for tr elements.

Changed November 03, 2010 06:17PM UTC by SlexAxton comment:4

priority: → low
status: newopen
type: bugenhancement

It should be consistent, whatever it is. Perhaps this should be an enhancement for 'consistently returning display values for elements not in the dom'

It's probably not very high on the list, but worth adding to the queue, likely.

Changed November 03, 2010 06:43PM UTC by sdoony comment:5

Thank you. I agree that consistency would be the most important thing across different versions. I originally submitted this because I was using the script to determine how a particular browser assigned the display css attribute.

Changed November 12, 2010 02:40AM UTC by snover comment:6

milestone: 1.4.3

Resetting milestone to future.

Changed April 16, 2011 09:40PM UTC by john comment:7

resolution: → patchwelcome
status: openclosed

I don't think that this is something that we're going to be able to reasonably resolve - it doesn't seem like any technique that we can do will work, even with the latest improvement.

Patches are welcome.