Skip to main content

Bug Tracker

Side navigation

#10123 closed bug (worksforme)

Opened August 24, 2011 04:21AM UTC

Closed August 24, 2011 11:38PM UTC

Last modified September 02, 2011 06:46PM UTC

.width() can return a float in Firefox 6

Reported by: neil@cresswell.net Owned by: neil@cresswell.net
Priority: low Milestone: 1.6.3
Component: dimensions Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:
Description

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.

Attachments (0)
Change History (5)

Changed August 24, 2011 01:43PM UTC by timmywil comment:1

component: unfileddimensions
owner: → neil@cresswell.net
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.

Changed August 24, 2011 09:31PM UTC by anonymous comment:2

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.

Changed August 24, 2011 11:38PM UTC by rwaldron comment:3

milestone: None1.6.3
resolution: → worksforme
status: pendingclosed

Changed September 02, 2011 03:52PM UTC by anonymous comment:4

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

Changed September 02, 2011 06:46PM UTC by anonymous comment:5

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.