This project is archived and is in readonly mode.

#1103 ✓wontfix
Delapouite

getOpacity() return decimal value with a comma instead of a point.

Reported by Delapouite | November 29th, 2010 @ 04:16 PM

Hi

http://jsfiddle.net/ArQty/

Here's a short example illustrated in the fiddle above :

var box = document.id('box');
box.setOpacity(0.2);
console.log(box.getOpacity());

Firefox and Opera returns 0.2 (with a point)
Chromium 7 on my Linux Box returns 0,2 (with a comma)

This creates undesirable side effect using the fade() function for example.

Comments and changes to this ticket

  • Christoph Pojer

    Christoph Pojer December 1st, 2010 @ 08:27 PM

    • State changed from “new” to “wontfix”

    Does not fail on Chrome 9 on Mac OS. This seems like a minor issue with Google Chrome (on Linux?) which got fixed. Chrome updates often so I don't think we need to handle this in MooTools.

  • Delapouite

    Delapouite December 2nd, 2010 @ 08:48 AM

    Thanks for your answer c3pojer.

    You're absolutely correct, I've done some research concerning webkit since reporting this bug and here some links which confirm the issue :

    http://code.google.com/p/chromium/issues/detail?id=33263

    The problem is related with the system locale. In my case French, so human readable values for decimal are in fact separated by a comma instead of point as in the en locale. Problem is here, we don't ask a value for human but to use it by a computer program.
    (By the way, I've always found this situation annoying, starting by the numeric keyboard embedding a point in its AZERTY version.)

    I will let the chromium team that the bug hasn't been resolved yet. In the meantime I've hardcoded a opacity.replace(',', '.') in my local MooTools copy.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Pages