I just used .class for this example. In my case I have a much more complex HTML structure so it took me a while to actually find the bug.
> If you're getting back one element, not two, it's a bug. The question > is, in what -- Prototype's selection code, Opera, or both? I lean > toward Opera bug. I guess the same, but maybe Prototype need an internal Opera workarround here? What would you suggest? File a bug report at Opera, Prototype or both? On 13 Jan., 11:35, "T.J. Crowder" <[email protected]> wrote: > Hi, > > > I am not sure if > > this is really a bug or an intended behaviour. > > If you're getting back one element, not two, it's a bug. The question > is, in what -- Prototype's selection code, Opera, or both? I lean > toward Opera bug. > > Interestingly, this _doesn't_ fail on Opera 9.10 for Windows: It > returns two elements as expected. > > Have you tried it using a different classname than "class" for the > inner element? (I tend to think you just used that in your example, > having seen this in something else, but just in case...) > -- > T.J. Crowder > tj / crowder software / com > Independent Software Engineer, consulting services available > > On Jan 12, 3:37 pm, Cyrus <[email protected]> wrote: > > > Hi there, > > > I have found a weird behaviour in the opera browser. I am not sure if > > this is really a bug or an intended behaviour. > > > The following example shows that the $$ function only returns one > > element instead of two. This is only because the second element is in > > a different dom level. All other browser return two elements with this > > example. > > > <?xml version="1.0" encoding="UTF-8"?> > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/ > > TR/xhtml11/DTD/xhtml11.dtd"> > > <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" xml:lang="de"> > > > <head> > > > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" > > /> > > > <title>Test</title> > > > <script src="jsLib/prototype.js" type="text/javascript"></script> > > > <script type="text/javascript"> > > //<![CDATA[ > > function init() { > > // init more information handling > > var test = $$('.wrapper .class'); > > } > > > // when the dom is fully loaded, execute these scripts > > document.observe("dom:loaded", init); > > //]]> > > </script> > > > </head> > > > <body> > > > <div class="wrapper"> > > <a href="#" class="class">test</a> > > </div> > > <div> > > <div class="wrapper"> > > <a href="#" class="class">test</a> > > </div> > > </div> > > </body> > > </html> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
