No, I screwed up when optimizing the descendantOf function. :-) In IE, first it tries to compare the souceIndex properties of the two nodes, but falls back on the old way of doing things if that doesn't work. But the new approach mucked around with the variables that the fallback approach needs, so that was causing the bug. I'm surprised the unit tests didn't catch this, but it certainly wouldn't be the first time.
Cheers, Andrew On Nov 14, 12:39 pm, Nicholas <[EMAIL PROTECTED]> wrote: > So IE isn't reporting the next sibling right? I don't completely > understand, but it does indeed fix the problem I was seeing. > > Thank you very much for such a quick patch. > Nicholas > > On Nov 14, 12:34 pm, Andrew Dupont <[EMAIL PROTECTED]> wrote: > > > OK, I've tracked it down. I don't think it's caused by dynamic > > creation of elements. I think it's caused by a specific situation > > where neither the ancestor element nor any of *its* ancestors has a > > nextSibling. > > > Here's the patch: <http://pastie.caboo.se/117941>. This produces the > > intended results in IE; apply it and let me know if it works for you. > > If so, I'll commit it to trunk. > > > Thanks! > > Andrew > > > On Nov 14, 9:20 am, Nicholas <[EMAIL PROTECTED]> wrote: > > > > Ok I have nailed down when it happens but not really why. I am going > > > to provide 2 urls one running on 1.6 final and one running on 1.6 > > > rc1. Basically I think that a call to descendantOf call in IE7 > > > returns true when it should return false in the following > > > circumstances: > > > > If the parameter in descendantOf is created by javascript and appended > > > to the body. > > > > or > > > > If the parameter in descendantOf is created by javascript and > > > appended to a node that was created by javascript and attached to the > > > body > > > > or > > > > etc > > > > This is hard to explain so if you need further clarification please > > > ask. > > > > URLS: > > > >http://widgets.simpltry.com/descendant_of_test_case/final.htmlhttp://... > > > > Hope this helps, > > > Nicholas > > > > On Nov 13, 3:48 pm, Andrew Dupont <[EMAIL PROTECTED]> wrote: > > > > > I'll investigate this when I get a chance. In the meantime, can you > > > > work on that test case? > > > > > Thanks, > > > > Andrew Dupont > > > > > On Nov 13, 9:49 am, Nicholas <[EMAIL PROTECTED]> wrote: > > > > > > I was trying to update my widgets library from 1.6rc1 to 1.6 final and > > > > > I think there was a bug introduced in the descendantOf method in IE7 > > > > > (haven't tried 6), I don't have a reproduceable test case yet, but it > > > > > seems to be when you write a node with js, descendantOf always returns > > > > > true. Anybody else notice this? > > > > > > Thanks, > > > > > Nicholas --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
