This project is archived and is in readonly mode.

#334 ✓duplicate
Chris Drackett

float style in safari | firefox

Reported by Chris Drackett | August 26th, 2008 @ 01:42 AM | in 1.3.0 rc2 (closed)

In safari 3.1.2, the float style seems to be returned by:

getComputedStyle('float') and not

'cssFloat' or 'styleFloat' as is currently in the code:

because of this, safari return 'Null' for getFloat.

Comments and changes to this ticket

  • Chris Drackett

    Chris Drackett August 26th, 2008 @ 01:49 AM

    • Title changed from “float style in safari” to “float style in safari | firefox”

    from what I can tell, firefox 2 and 3 are also looking for


    while IE is looking for


  • Tom Occhino

    Tom Occhino October 6th, 2008 @ 07:58 AM

    • State changed from “new” to “open”
    • Milestone changed from 2.0 to 1.2.3
    • Tag changed from defect, safari to defect, firefox, safari
  • Daniele C.

    Daniele C. December 17th, 2008 @ 09:31 AM

    I've experienced the same problem, but, maybe, i've found a workaround:

    It seems that the getPropertyValue() method of DOM CSS Properties List, return the element float if you pass as argument ["float"], not ["cssFloat"].

    So, in the method getComputedStyle (Mootools 1.2.1, row 1734), I've added a row before the return:

    now the method is:

    getComputedStyle: function(property){

    if (this.currentStyle) return this.currentStyle[property.camelCase()];
    var computed = this.getDocument().defaultView.getComputedStyle(this, null);
    property = property == 'cssFloat' || property == 'styleFloat' ? 'float' : property;
    return (computed) ? computed.getPropertyValue([property.hyphenate()]) : null;


    Now seems to work in IE 6/7, Safari 3.2.1, FireFox 3.0.4, Opera 9.62.

    I don't know if this can be the best way to solve the problem, but I hope this can help.

    -- Daniele

  • Thomas Aylott
  • Daniele C.

    Daniele C. January 26th, 2010 @ 07:11 PM

    • Tag changed from defect, firefox, safari to defect, firefox, float, getstyles, safari
  • Fábio M. Costa

    Fábio M. Costa April 4th, 2010 @ 11:04 PM

    • State changed from “open” to “duplicate”
    • Milestone set to 1.3.0 rc2

    duplicate of #756, theres the same info there too. Thanks guys.

Create your profile

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

Shared Ticket Bins