I''ve searched all over but can''t seem to find any mention of this. We have a carousel on our homepage that is written using scriptaculous and prototype. Recently we upgraded both libraries, to scriptaculous 1.8.0 and prototype 1.6.0. Now we''re getting errors in IE. I thought maybe there was some issue with backwards compatibility, that we would need to change our code somehow. But I just tried a super-simple test case, and it breaks there too. (See below for test case.) The error message in IE is "Object doesn''t support this property or method". Using the Microsoft Script Debugger, it looks like an exception is being caught down in Enumerable.each. Basically the call stack is something like: Enumerable.each Enumerable.inject Element.getStyles Object.methodize Effect.Morph.initialize Is nobody else getting these errors in IE when they use Effect.Morph? Should I file a bug report? I''m supposed to get this fixed for our next release, but the bug doesn''t appear to be in our code, and I can''t quite figure out the prototype/scriptaculous code to fix it myself. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:// www.w3.org/TR/html4/loose.dtd"> <html> <head> <script src="/js/prototype160.js" type="text/javascript"></script> <script src="/js/scriptaculous/scriptaculous.js?load=effects" type="text/javascript"></script> <style> .test { width: 200px; height: 200px; } .beforeMorph { background-color: red; } .afterMorph { background-color: blue; } </style> </head> <body> <div class="test beforeMorph" id="myDiv"></div> <input type="button" value="Click me" onclick="$ (''myDiv'').morph(''afterMorph'')"/> </body> </html> --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
This group doesn''t seem terribly well-populated or active, so I went ahead and created a bug for this: http://dev.rubyonrails.org/ticket/10563. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Since the group seems a little more active now, hoping someone will read this and know what''s going on. Did they not even test Effect.Morph in IE before saying it was release-worthy? The simplest test case shows this error in IE. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Jennifer wrote:> Since the group seems a little more active now, hoping someone will > read this and know what''s going on. Did they not even test > Effect.Morph in IE before saying it was release-worthy? The simplest > test case shows this error in IE. > >Please see the bottom of the wiki page: http://wiki.script.aculo.us/scriptaculous/show/Effect.Morph . The styles you want to morph must be applied inline. There is no speedy cross-browser way to determine which styles cascade to the element via stylesheets. morph() does not take a css class name as a parameter as you are using. That would be a neat addition. The resource-intensive part there is reading the css style definitions across all browsers, especially if the definition is in multiple blocks. The script would need to iterate across every css rule in each of the stylesheets. The source for Scriptaculous unit tests can be downloaded through svn or viewed online: http://dev.rubyonrails.org/browser/spinoffs/scriptaculous/test/unit - Ken Snyder --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
The wiki documentation is rather sparse and vague. See http://dev.rubyonrails.org/ticket/6674 for the change that allows class names to be passed to Effect.Morph. Note, this was working with the last versions of scriptaculous & prototype, and it still does work in firefox. It even works in IE (the morph effect occurs) but this error is being thrown. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
> morph() does not take a css class name as a parameter as you are using.Ken, it does. Jennifer: Please file a bug for this issue with a failing test case and the detail of the error you are getting. Thanks! Tobie> The source for Scriptaculous unit tests can be downloaded through svn or > viewed online:http://dev.rubyonrails.org/browser/spinoffs/scriptaculous/test/unit > > - Ken Snyder--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Tobie, there''s a link to the bug I created in the 2nd message of this thread. Thanks. :) --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
OK, found the issue and patched it. Don''t have commit rights on the script.aculo.us repository so you''ll have to wait until Thomas commits it. (Note that IE doesn''t accept shorthand for colors, so you can''t use "blue" etc). Best, Tobie --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
patch: http://dev.rubyonrails.org/attachment/ticket/10563/diff.diff --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Excellent, thank you! --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Tobie Langel wrote:>> morph() does not take a css class name as a parameter as you are using. >> > > Ken, it does. >Wahoo! Auto-magic-alicious! --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---