Side navigation
#1303 closed bug (wontfix)
Opened June 19, 2007 09:30AM UTC
Closed November 17, 2007 02:32AM UTC
$("#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: |
Description
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.
Attachments (0)
Change History (2)
Changed July 26, 2007 03:00AM UTC by comment:1
component: | dimensions → core |
---|---|
owner: | paul |
priority: | minor → trivial |
Changed November 17, 2007 02:32AM UTC by comment:2
milestone: | 1.1.3 → 1.2.2 |
---|---|
resolution: | → wontfix |
status: | new → closed |
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.