|
I’ve recently begun testing some of the scriptaculous
functionality in IE 5.5, since my company wants me to support as many browsers
as possible. When I do an Effect.Highlight on a <tr>, it
doesn’t quite work right. I’ve figured out a few things, but
I’m not sure whether you want to change them or not. Here’s
what I know: That, however, doesn’t fix the
problem. The problem is that IE 5.5 seems to ignore setting the
style.backgroundColor on TR elements. If you apply it instead to all of
its child TD elements, it will work correctly. So, in the
Effect.Highlight.update and Effect.Highligh.finish functions you would need to
loop through all childNodes if the element is a TR and apply the same color to
each childNode, as such: update: function(position) { var effect = this; var colors =
$R(0,2).map( function(i){ return
Math.round(effect.colors_base[i]+(effect.colors_delta[i]*position)) }); this.updateElementColor("#" + colors[0].toColorPart() +
colors[1].toColorPart() + colors[2].toColorPart()); }, finish: function() {
this.updateElementColor(this.options.restorecolor); this.element.style.backgroundImage =
this.oldBgImage; }, updateElementColor: function(color) { this.element.style.backgroundColor =
color; // some browsers don't recognize changing
the background color on TR elements if (this.element.tagName && this.element.tagName.toUpperCase()
== 'TR') { for (var i=0;
i<this.element.childNodes.length; i++) {
this.element.childNodes[i].style.backgroundColor = color; } } } There was another browser that had the same issue as IE 5.5,
I can’t remember if it was Opera 8 or Safari 1.3 at the moment,
though. And I haven’t tested the fix in that other browser, either. Anyway, as that will probably make the effect slower for
everyone just to fix fringe cases, I’m not sure it’s desirable to
add it. Maybe we could do a browser test as well. I thought
I’d pass it along to see what you guys think. Everything else I
tested works in IE 5.5 just fine (and Effect.Highlight works if it isn’t
a TR). Oh, and nothing works in IE 5.0 at all, in case anyone is
wondering. _javascript_ errors galore. Even prototype.js
doesn’t work, because IE 5 doesn’t seem to recognize the
(‘value’ in opt) used to determine a SELECT box’s value. Thanks, Greg Hill |
_______________________________________________ Rails-spinoffs mailing list [email protected] http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
