That's what functional tests are for.
http://script.aculo.us/current/test/functional/ 
effects_float_appear_test.html

If anyone could add a patch + functional test page for the
setOpacity thing, with positive results for all supported browsers,
I'd be more than happy to fix this issue. :)

-Thomas

Am 23.08.2006 um 11:58 schrieb Fabian Lange:

>
> Then perhaps this code here does not work :)
>
>   // force Safari to render floated elements properly
>   afterFinishInternal: function(effect) {
>     effect.element.forceRerendering();
>   }
>
> Which is from Effects.Appear
>
> Fabian
>
> -----Original Message-----
> From:
> grbounce-_Pkz0AUAAAB9-VKt0- 
> [EMAIL PROTECTED]
> om
> [mailto:grbounce-_Pkz0AUAAAB9-VKt0- 
> [EMAIL PROTECTED]
> groups.com] On Behalf Of Lorenz Knies
> Sent: Mittwoch, 23. August 2006 07:51
> To: [email protected]
> Subject: [Rails-spinoffs] Re: Effect.Appear Safari issue
>
>
> Hi Brandon,
>
> try your Demo effect.appear2.html.
>
> After the effects took place, and the div with style float: left is
> invisible, try a resize of the window.
> The div is there again.
> This seem like a rendering bug of safari.
>
> On the effect demo page from script.aculo.us try this:
> Size the window that Effect.Shake is next to Effect.DropOut.
> Now start Effect.DropOut. Wait until the Effect.DropOut div appears
> again. Since it is reshown with Effect.Appear, it ends being  
> invisible.
> Now start Effect.Shake.
> The Effect.DropOut div is now partially visible.
> This must be a bug.
> Perhaps one has to do somthing after an Effect.Appear that forces
> Safari to rerender the div, to wor around this.
>
> regards,
>
> Lorenz
>
> On 22.08.2006, at 23:06, Brandon Aaron wrote:
>
>>
>> Grrr ....
>>
>> So ... here is a quick test:
>> http://brandonaaron.net/testing/effect.appear.html
>>
>> float: left is working there ... however if you remove the  
>> afterFinish
>> on the Effect.Appear that spits out the final results float: left
>> doesn't work:
>> http://brandonaaron.net/testing/effect.appear2.html
>>
>> Getting more specific on my situation ...
>> I've got a gallery that is dynamically created via dom methods and
>> then two images that are switched ... faded back and forth between  
>> the
>> two. In Safari the Effect.Appear on the image is being hidden  
>> after it
>> shows up. If I look at the opacity after the fact it is set back  
>> to 0.
>> I've got no code setting opacity except that of the Effect.Fade and
>> Effect.Appear. The images are positioned absolute and z-indexs are
>> changed. The parent div is also positioned absolute. By removing the
>> null and making it 1 or let it bet the 0.99999 it shows up just fine.
>>
>> Brandon
>>
>> On 8/22/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
>>> Yeah ... I knew better than to just throw out a blanket statement
>>> like that.
>>>
>>> This is happening on an element with position absolute for me.
>>>
>>> Brandon
>>>
>>> On 8/22/06, Lorenz Knies <[EMAIL PROTECTED]> wrote:
>>>>
>>>> I've tested on Safari 2.0:
>>>> setting $('div').style.opacity = null;  makes the div visible.
>>>> Reading out the opacity afterwards returns an empty string.
>>>> setting $('div').style.opacity = 0; makes the div invisible.  
>>>> Reading
>>>> out the opacity returns 0.
>>>> So no conversion to zero here.
>>>>
>>>> Lorenz
>>>>
>>>>
>>>> On 22.08.2006, at 20:13, Brandon Aaron wrote:
>>>>
>>>>>
>>>>> null for Safari will not work. Safari converts null to 0.
>>>>>
>>>>> Brandon
>>>>>
>>>>> On 8/22/06, Lorenz Knies <[EMAIL PROTECTED]> wrote:
>>>>>>
>>>>>> I think that IE just responds to the second line setting the
>>>>>> filter:alpha() stuff. So in IE it should be rather unimportant
>>>>>> if you
>>>>>> set opacity to 1 or 0.9999999999
>>>>>> This line seems to be for Mozilla.
>>>>>>
>>>>>> But since Opera 9 this line is not correct anymore, since Opera
>>>>>> unlike other browsers, does not change the opacity value if  
>>>>>> set to
>>>>>> null.
>>>>>> So this line should set the value to 0.999999 for Mozilla, null
>>>>>> for
>>>>>> Safari and 1 fo Opera. 1 would be o.k. for Safari also, in my
>>>>>> opinion.
>>>>>>
>>>>>> Lorenz
>>>>>>
>>>>>> On 22.08.2006, at 15:15, Brandon Aaron wrote:
>>>>>>
>>>>>>>
>>>>>>>> I take back what I said about IE needing a value of 1.
>>>>>>>
>>>>>>> That should say... I take back what I said about IE needing a
>>>>>>> value of
>>>>>>> .99999 instead of 1.
>>>>>>>
>>>>>>> Brandon
>>>>>>>
>>>>>>> On 8/22/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
>>>>>>>> I take back what I said about IE needing a value of 1. I get  
>>>>>>>> the
>>>>>>>> white
>>>>>>>> spots/pixels in what seems to be only pure black areas no  
>>>>>>>> matter
>>>>>>>> what
>>>>>>>> value I use.
>>>>>>>>
>>>>>>>> On 8/22/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
>>>>>>>>> It doesn't just do it on floated elements though. My  
>>>>>>>>> element is
>>>>>>>>> positioned absolute. I haven't had the time to produce some
>>>>>>>>> unit
>>>>>>>>> tests. However, I have figured out that you do not want to
>>>>>>>>> set the
>>>>>>>>> opacity to .99999 instead of 1 for IE or you will get white
>>>>>>>>> spots in
>>>>>>>>> images with pure black. Mozilla/Firefox is the only one that
>>>>>>>>> needs
>>>>>>>>> .99999 instead of 1. All the other browsers need a non null
>>>>>>>>> value.
>>>>>>>>>
>>>>>>>>> Brandon
>>>>>>>>>
>>>>>>>>> On 8/22/06, Lorenz Knies <[EMAIL PROTECTED]> wrote:
>>>>>>>>>>
>>>>>>>>>> It seems to be a rendering bug in Safari related to the
>>>>>>>>>> float:left
>>>>>>>>>> style.
>>>>>>>>>> Try Effect.Appear in the script.aculo.us demo. The DIV  
>>>>>>>>>> appears
>>>>>>>>>> correctly, then 'disappears'. Now just do a tiny resize on  
>>>>>>>>>> the
>>>>>>>>>> window
>>>>>>>>>> and the DIV is there again.
>>>>>>>>>> I would say this is a bug.
>>>>>>>>>>
>>>>>>>>>> Lorenz
>>>>>>>>>>
>>>>>>>>>> On 18.08.2006, at 15:08, Brandon Aaron wrote:
>>>>>>>>>>
>>>>>>>>>>> Sure I'll create some unit tests.
>>>>>>>>>>>
>>>>>>>>>>> Brandon
>>>>>>>>>>>
>>>>>>>>>>> On 8/18/06, Thomas Fuchs <[EMAIL PROTECTED]> wrote:
>>>>>>>>>>>> I think we should make a test case page for this, that
>>>>>>>>>>>> has all
>>>>>>>>>>>> sorts
>>>>>>>>>>>> of opacity enabled/disabled elements
>>>>>>>>>>>> and see if everything works fine. Any volunteers? :)
>>>>>>>>>>>>
>>>>>>>>>>>> -Thomas
>>>>>>>>>>>>
>>>>>>>>>>>> Am 18.08.2006 um 09:42 schrieb Lorenz Knies:
>>>>>>>>>>>>
>>>>>>>>>>>>> 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
>>>>>>>>>>>>>> [email protected]
>>>>>>>>>>>>>> http://lists.rubyonrails.org/mailman/listinfo/rails-
>>>>>>>>>>>>>> spinoffs
>>>>>>>>>>>>>
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> Rails-spinoffs mailing list
>>>>>>>>>>>>> [email protected]
>>>>>>>>>>>>> http://lists.rubyonrails.org/mailman/listinfo/rails-
>>>>>>>>>>>>> spinoffs
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Thomas Fuchs
>>>>>>>>>>>> wollzelle
>>>>>>>>>>>>
>>>>>>>>>>>> http://www.wollzelle.com
>>>>>>>>>>>>
>>>>>>>>>>>> questentier on AIM
>>>>>>>>>>>> madrobby on irc.freenode.net
>>>>>>>>>>>>
>>>>>>>>>>>> http://www.fluxiom.com :: online digital asset management
>>>>>>>>>>>> http://script.aculo.us :: Web 2.0 JavaScript
>>>>>>>>>>>> http://mir.aculo.us :: Where no web developer has gone
>>>>>>>>>>>> before
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Rails-spinoffs mailing list
>>>>>>>>>>>> [email protected]
>>>>>>>>>>>> http://lists.rubyonrails.org/mailman/listinfo/rails- 
>>>>>>>>>>>> spinoffs
>>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Rails-spinoffs mailing list
>>>>>>>>>>> [email protected]
>>>>>>>>>>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>>
>>>>
>>>>
>>>>>>
>>>>
>>>
>>
>>>
>
>
>
>
> >

--
Thomas Fuchs
wollzelle

http://www.wollzelle.com

questentier on AIM
madrobby on irc.freenode.net

http://www.fluxiom.com :: online digital asset management
http://script.aculo.us :: Web 2.0 JavaScript
http://mir.aculo.us :: Where no web developer has gone before





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs
-~----------~----~----~----~------~----~------~--~---

Reply via email to