Ok, eventlisteners can be added before layer creation again. Looks that I got IE5.5 to 
obey me as a marine, ( yes
sir i'm a piece o'shit sir !! ) and now I only need to fix some stupid NS issues. 
Maybe I did cause some of these
errors myself while fixing others but anyway.

I'm commented out these lines:

if (e.type=="mouseout" && this.contains(e.toElement)) return true;
if (e.type=="mouseover" && this.contains(e.fromElement)) { return true; }

which were causing trouble. If they need to be there please the author tell me why. I 
can't think of any
circunstance where they should be in there.


Jordi 'IlMaestro' Ministral wrote:

> I think I'm almost there this time. The fix I posted on CVS was OK, but was not 
>enought. It seems that adding
> a listener before the layer is added to the document causes mouseover events to get 
>lost. Click events work,
> though.
>
> Weird as usual
>
> Jordi 'IlMaestro' Ministral wrote:
>
> > I'm discovering lots of things about the event model now that we have the 
>precreation code. I don't really
> > know if it has always been the same but I never realized.
> >
> > If you could just have a little patience I think I can beat it.
> >
> > Jordi 'IlMaestro' Ministral wrote:
> >
> > > I'm missing events... did I screw something ? First I thought but then going 
>back to the latest code (
> > > before my modifications ) I am missing those same events. Ohh please just a 
>little luck from time to
> > > time !!!!!
> > >
> > > In NS you can apply the same "for (each image in doc) img.lyrobj = myself" event 
>trick to the links
> > > array.
> > >
> > > Jordi 'IlMaestro' Ministral wrote:
> > >
> > > > I have updated CVS with a new events.js that should fix IEs event problems. 
>All the example files
> > > > worked fine. This is what happened ( at least this is something I found, maybe 
>there are still
> > > > other issues ):
> > > >
> > > > - All browser events in DynAPI are captured and passed to the same 
>EventMethod. This eventMethod
> > > > identifyes the physical layer, cancels browser event, searches for the 
>appropiate DynmLayer object
> > > > and invokes its event.
> > > >
> > > > - In IE, in order to access the DynLayer object we use the lyrobj property of 
>the DIV itself. This
> > > > property is set when creating a layer so from code executed within the DIV's 
>scope we can still get
> > > > to our DynLayer obj. The problem with our contents was that when clicking on a 
>text, most of the
> > > > times the srcElement of the event was not the DIV but a FONT, TD, TR, TABLE, 
>UL,... element. That
> > > > element did not have a pointer to the dynlayer and thus the API could not 
>route the event properly.
> > > >
> > > > - This issue was partially solved for images by doing:
> > > >
> > > > if (is.ie) for (i in dlyr.elm.all.tags("img")) 
>dlyr.elm.all.tags("img")[i].lyrobj=dlyr;
> > > >
> > > > So images had a pointer to the layer aswell. This we would have needed to do 
>to all elements in our
> > > > content, somethig really painful. Instead, I added this line inside 
>eventmethod.
> > > >
> > > >  for(;is.ie && !realsrc.lyrobj && realsrc.parentElement &&
> > > > realsrc.parentElement!=realsrc;realsrc=realsrc.parentElement);
> > > >
> > > > Which actually makes realsrc travel IE's object hierarchy until we find the 
>lyrobj reference. By
> > > > doing so I fixed events in IE5 and 5.5. I'm not that sure everything is fine 
>now, but it is an
> > > > improvement.
> > > >
> > > > There are several lines in that method such as that
> > > >
> > > > if (e.type=="mouseover" || e.type=="mouseout") return false;
> > > >
> > > > just before the bubbleEvent() call that I don't understand but I prefer not to 
>touch them.
> > > >
> > > > By the way, it seems that when clicking on a selectable text, NS does not fire 
>a click event.
> > > > Mousedown and mouseup are fired, but click isn't. We could fire it manually 
>but then when clicking
> > > > outside a text we would get two onclicks.
> > > >
> > > > Tell me if I broke something. Sure I did.
> > > >
> > > > Cya
> > > >
> > > > _______________________________________________
> > > > Dynapi-Dev mailing list
> > > > [EMAIL PROTECTED]
> > > > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev
> > >
> > > _______________________________________________
> > > Dynapi-Dev mailing list
> > > [EMAIL PROTECTED]
> > > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev
> >
> > _______________________________________________
> > Dynapi-Dev mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev
>
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/mailman/listinfo/dynapi-dev


_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-dev

Reply via email to