Skip to main content

Bug Tracker

Side navigation

#8420 closed bug (invalid)

Opened March 02, 2011 10:00AM UTC

Closed March 29, 2011 08:07AM UTC

Last modified March 14, 2012 12:46PM UTC

.outerHeight misses CAPTION height when object is TABLE

Reported by: r.i.k@free.fr Owned by: r.i.k@free.fr
Priority: undecided Milestone: 1.next
Component: manipulation Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:
Description

The computed height of a table with no rows but only a caption returns 0, missing the height of the caption.

Although W3C specifies that a table MUST have rows, dynamic manipulation can lead to a table with no rows but only a caption.

FYI, above is what I locally use to "overload" the .outerHeight method :

jQuery.fn.outerHeight = function(origMethod)
{
	return function(args)
	{
		var h = origMethod.apply(jQuery(this), [args]) ;
		
		if (this.get(0).tagName.toLowerCase() == 'table' && this.find('> caption').size() > 0)
		{
			h += origMethod.apply(this.find('> caption'), [args]) ;			
		}
			
		return h ;
	} ;
}(jQuery.fn.outerHeight);

Attachments (0)
Change History (3)

Changed March 14, 2011 02:35PM UTC by rwaldron comment:1

component: unfiledmanipulation
owner: → r.i.k@free.fr
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!

Additionally, test against the jQuery 0 GIT version to ensure the issue still exists.

Changed March 29, 2011 08:07AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Changed September 06, 2011 02:15AM UTC by tigrangab@gmail.com comment:3

I can confirm this: http://jsfiddle.net/tPtef/

It does not take into account the caption height.