This project is archived and is in readonly mode.

#395 ✓duplicate
Nacho Roca

getStyle('float') not working in any browser other than IE

Reported by Nacho Roca | September 24th, 2008 @ 06:21 PM | in 1.3.0 rc2 (closed)

Element.getStyle('float') is returning null in any browser other than IE.

Problem is found in Element.getComputedStyle() { if (this.currentStyle) return this.currentStyle[property.camelCase()]; var computed = this.getWindow().getComputedStyle(this, null); return (computed) ? computed.getPropertyValue([property.hyphenate()]) : null; }

Firefox and Safari will detect the float property as computed["cssFloat"], but will fail to return it properly due to the hyphenation.

Fixed it adding

if(computed[property]) return computed[property];

before line 1580.

Comments and changes to this ticket

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