Bug Tracker

Opened 16 years ago

Closed 15 years ago

#1303 closed bug (wontfix)

$("#content").attr("clientHeight") doesn't work in Firefox

Reported by: Mario Owned by:
Priority: trivial Milestone: 1.2.2
Component: core Version: 1.1.2
Keywords: Cc:
Blocked by: Blocking:


I have a div with id 'content'..

Calling $("#content").attr("clientHeight") returns undefined in Firefox, but works in IE6.

I tried $("#content").get()[0]clientHeight? and that worked in Firefox as well, and adding clientHeight to

var fix = jQuery.isXMLDoc(elem) ? {} : {

"for": "htmlFor", "class": "className", "float": jQuery.browser.msie ? "styleFloat" : "cssFloat", cssFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat", innerHTML: "innerHTML", className: "className", value: "value", disabled: "disabled", checked: "checked", readonly: "readOnly", selected: "selected", clientHeight: "clientHeight"


fixed the problem.

Change History (2)

comment:1 Changed 16 years ago by brandon

Component: dimensionscore
Owner: paul deleted
Priority: minortrivial

comment:2 Changed 15 years ago by davidserduke

Resolution: wontfix
Status: newclosed

clientHeight and clientWidth are undependable. The bug reporter said it worked in IE but not in FF. It also doesn't work in Opera or Safari. Adding "clientHeight" and "clientWidth" to the list as the reporter suggests does make it work in FF, Opera, and Safari.

But under certain conditions (like the elem is display:none or in IE when there is no CSS layout for the element), they will still return undefined in browser dependent ways. Since the reporting of this bug, width() and height() have been added to the core and those functions already try to deal with clientHeight and clientWidth oddities.

For those reasons I'm going to close this bug as wontfix. If someone feels they have a compelling reason I'm overlooking please reopen it and let us know.

Note: See TracTickets for help on using tickets.