Bug Tracker

Opened 10 years ago

Closed 9 years ago

#5365 closed bug (wontfix)

.width() and .height() reports wrong lengths in Firefox 3.5 on Mac 10.5

Reported by: ambirex Owned by: brandon
Priority: major Milestone: 1.4
Component: dimensions Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

Description

Firefox emulates the looks of Mac form controls and jQuery reports the wrong width for the element, actually only taking into account the inner text of the control. To be more accurate it would have to take into account the borders of the control.

Attachments (2)

Picture 1.png (175.4 KB) - added by ambirex 10 years ago.
Screenshot of firebug illustrating the problem
5365-test-case-01.html (465 bytes) - added by ambirex 10 years ago.
Test case

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by ambirex

Attachment: Picture 1.png added

Screenshot of firebug illustrating the problem

comment:1 Changed 10 years ago by dmethvin

Can you provide a test case as well? Just the minimum HTML/script needed to reproduce the problem. Thanks.

Changed 10 years ago by ambirex

Attachment: 5365-test-case-01.html added

Test case

comment:2 Changed 10 years ago by ambirex

I've attached a test case, here is what I found so far:

In Safari 4.0.3 (Mac) it reports a width of 117, which when I measure from a screenshot includes the arrows on the right side of the control In IE7 (WinXP) it reports 118, which includes the arrow In Firefox 3.5 (WinXP) it reports 122, which includes the arrow In Chrome 3.0.195 (WinXP it reports 118, which includes the arrow

In Safari 4.0.3 (WinXP) it reports 95, which doesn't include the arrow. In Firefox 3.5 (Mac) it reports 93, which doesn't include the arrow.

comment:3 Changed 10 years ago by ambirex

Just a quick correction: Firefox 3.5 (WinXP) it reports 120, Firefox 2.0 (WinXP) reports 122

comment:4 Changed 9 years ago by snover

Resolution: wontfix
Status: newclosed

I’m not sure what jQuery is supposed to do about this; if the browser is calculating dimensions of form elements incorrectly, that’s not really something we can test for because we will never know what the OS native chrome adds to a form field.

Note: See TracTickets for help on using tickets.