Ticket #1001 (closed enhancement: invalid)
Fx.CSS > IE7 fix
| Reported by: | wernerm | Owned by: | |
|---|---|---|---|
| Type: | enhancement | Priority: | critical |
| Milestone: | Mootools version 1.2 | Component: | Core |
| Keywords: | fx.css ie7 | Cc: |
Description
It seems that IE7 (and sometimes IE6) has trouble creating Elements fast enough before trying to render CSS Fx on them. It could be another cause all together, but this "bug" caused quite a few scripts to throw errors when it makes use of Fx.CSS in 1.2b2.
Unfortunately, I don't have a test case handy but will try to get one as soon as I have time - sorry about that!
I either case, the following simple check added to 1.2 fixed all issues I have found - the render function should check for presence of a setStyle() method before trying to apply the transformation to the object:
//renders the change to an element
render: function(element, property, value){
if (element.setStyle) {
element.setStyle(property, this.serve(value, this.options.unit));
}
},
...
That's it - the simple check makes it much more stable in IE.