Hi Brandon,

I,ve had the same issue with opera.
I changed the line like this without any problems so far:

Element.setStyle(element, { opacity:
(/Gecko/.test(navigator.userAgent) &&
!/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ?
0.999999 : null });

to

Element.setStyle(element, { opacity:
(/Gecko/.test(navigator.userAgent) &&
!/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ?
0.999999 : 1 });

Perhaps this works for Safari too.

Lorenz

On 16.08.2006, at 15:40, Brandon Aaron wrote:

I've been putting this off for several days now, waiting to check
dev.rubyonrails.org before I posted here but it is still down.

I am using Effect.Appear and it is working great except in Safari
where it fades in and then disappears. I traced it back to the
Element.setOpacity function. Is there a reason why Safari is singled
out and given a null value for opacity instead of 1 or 0.999999? This
is where the problem is happening and can be seen directly from the
demo page itself
(http://wiki.script.aculo.us/scriptaculous/show/ CombinationEffectsDemo).
I simply changed this line:

Element.setStyle(element, { opacity:
(/Gecko/.test(navigator.userAgent) &&
!/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ?
0.999999 : null });

to this:

Element.setStyle(element, { opacity: 0.999999 });

And this working perfectly for me in Safari 2 and 1.3 and it didn't
hurt any of the other supported browsers. I don't have 1.2 to test it
in.

However, I believe that Element.setStyle should have the responsiblity
of normalizing special cases like opacity. More details here:
http://www.brandonaaron.net/articles/2006/08/12/effect-appear- safari-fix

Brandon
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to