Skip to main content

Bug Tracker

Side navigation

#5365 closed bug (wontfix)

Opened October 13, 2009 09:47PM UTC

Closed November 01, 2010 05:43AM UTC

.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)
  • 5365-test-case-01.html (0.5 KB) - added by ambirex October 14, 2009 02:47PM UTC.

    Test case

  • Picture 1.png (175.4 KB) - added by ambirex October 13, 2009 09:47PM UTC.

    Screenshot of firebug illustrating the problem

Change History (4)

Changed October 13, 2009 11:00PM UTC by dmethvin comment:1

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

Changed October 14, 2009 02:49PM UTC by ambirex comment:2

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.

Changed October 14, 2009 02:51PM UTC by ambirex comment:3

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

Changed November 01, 2010 05:43AM UTC by snover comment:4

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.