Bug Tracker

Ticket #10123 (closed bug: worksforme)

Opened 3 years ago

Last modified 3 years ago

.width() can return a float in Firefox 6

Reported by: neil@… Owned by: neil@…
Priority: low Milestone: 1.6.3
Component: dimensions Version: 1.6.2
Keywords: Cc:
Blocking: Blocked by:

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.

Change History

comment:1 Changed 3 years ago by timmywil

  • Owner set to neil@…
  • Priority changed from undecided to low
  • Status changed from new to pending
  • Component changed from unfiled to dimensions

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 3 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 3 years ago by rwaldron

  • Status changed from pending to closed
  • Resolution set to worksforme
  • Milestone changed from None to 1.6.3

comment:4 Changed 3 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 3 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.