Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#8420 closed bug (invalid)

.outerHeight misses CAPTION height when object is TABLE

Reported by: r.i.k@… Owned by: r.i.k@…
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);

Change History (3)

comment:1 Changed 8 years ago by Rick Waldron

Component: unfiledmanipulation
Owner: set to r.i.k@…
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.

comment:2 Changed 8 years ago by trac-o-bot

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!

comment:3 Changed 8 years ago by tigrangab@…

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

It does not take into account the caption height.

Note: See TracTickets for help on using tickets.