Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#10123 closed bug (worksforme)

.width() can return a float in Firefox 6

Reported by: [email protected] Owned by: [email protected]
Priority: low Milestone: 1.6.3
Component: dimensions Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:


I have an image set to exactly "350px" width. In FF5 and earlier and on other browsers such as IE6-9 and Chrome, $('#someimageid').width() will correctly return 350 but for FF6 only, I get 349.76666. A FF bug perhaps but wanted to share as I was expecting an integer result since this should be an integer pixel size.

Change History (5)

comment:1 Changed 11 years ago by timmywil

Component: unfileddimensions
Owner: set to [email protected]
Priority: undecidedlow
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.

comment:2 Changed 11 years ago by anonymous

Sorry don't have time. Was letting you know as a courtesy since client site of mine was using JQuery. Repro is easy enough. Save a .jpg image with 350px width then load it specifying 350px width using .css. Finally use .width() under Firefox 6 to see if you get 350 or not. (In my case got 349.76....) If you can't repro, let me know and I can forward the image being used when discovered. However, over a dozen other images of the same size all exhibited the same symptoms.

comment:3 Changed 11 years ago by Rick Waldron

Milestone: None1.6.3
Resolution: worksforme
Status: pendingclosed

comment:4 Changed 11 years ago by anonymous

Why is this in the Fix notes for 1.6.3 when it wasn't fixed it was "works for me"?

comment:5 Changed 11 years ago by anonymous

From the notes, seems it couldn't be reproed in 1.6.3 but could in 1.6.2, therefore fixed in 1.6.3.

Note: See TracTickets for help on using tickets.