Ticket #801 (closed defect: invalid)
Hash should be cleaned when passed to Element.setStyles
| Reported by: | mattcoz | Owned by: | |
|---|---|---|---|
| Type: | defect | Priority: | major |
| Milestone: | Mootools version 1.2 | Component: | Core |
| Keywords: | Hash Element Style | Cc: |
Description
The filter function in the Hash object causes problems in IE when a Hash is passed to the Element.setStyles function. This can be avoided by cleaning the Hash object.
setStyles: function(styles){
if (Hash.type(styles)) styles = styles.getClean();
for (var style in styles) this.setStyle(style, styles[style]);
return this;
}
This also has the nice side effect of increasing performance.
Change History
Note: See
TracTickets for help on using
tickets.