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: Owned by:
Priority: undecided Milestone:
Component: manipulation Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:

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 ;
	} ;

Attachments (0)
Change History (3)

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

component: unfiledmanipulation
owner: →
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 comment:3

I can confirm this:

It does not take into account the caption height.