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: |
Description
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 comment:1
Changed June 25, 2010 01:36AM UTC by comment:2
component: | unfiled → css |
---|---|
summary: | IE Bug with css → css display property of table row returns undefined |
Changed November 03, 2010 05:24AM UTC by comment:3
Here is a fiddle displaying the behavior described http://jsfiddle.net/boushley/wuLRT/2/ 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 comment:4
priority: | → low |
---|---|
status: | new → open |
type: | bug → enhancement |
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 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 comment:6
milestone: | 1.4.3 |
---|
Resetting milestone to future.
Changed April 16, 2011 09:40PM UTC by comment:7
resolution: | → patchwelcome |
---|---|
status: | open → closed |
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.
https://github.com/jquery/jquery/commit/1dda994c463f01977c7126407998d61efed218a5
Patches are welcome.
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.