Nice work Benoit!
The dynlayer_ie.js and dynlayer_opera.js files had a
fix to this problem, but I think your solution will
work just fine for all browsers. I would however call
the function ._applyImageEventDragHandler()
Are your change making their way into CVS?
Are you the person working on the DynLayer_inline
module?
--
Raymond Irving
--- Benoit Marchant <[EMAIL PROTECTED]> wrote:
> I fixed this issue by calling
> this.applyDomImageEventWorkaround(). It
> will basically respect any custom event handler on
> the image if any
> exists.
> It needs to be called after each setHTML, and when
> you map a dynlayer
> to an inline div with something like getInline .
>
> I was tired of doing this by hand all the time !
>
> Is DynMouseEvent.EventMethod now
> MouseEvent._eventHandler ?
>
>
> domImageWorkaround = function(event) {
> DynMouseEvent.EventMethod(event);
> return false;
> }
>
> DynLayer.prototype.applyDomImageEventWorkaround =
> function() {
> if(is.dom && !is.ie) {
> var images =
> this.elm.getElementsByTagName("img");
> for (var j=0;j<images.length; j++) {
> var image = images[j];
> image.lyrobj = this;
> if((typeof(image.onmousedown) ==
> "undefined") ||
> (typeof(image.onmousedown) != "function"))
> {
> image.onmousedown = domImageWorkaround;
> }
> if((typeof(image.onmouseup) ==
> "undefined") ||
> (typeof(image.onmouseup) != "function"))
> {
> image.onmouseup = domImageWorkaround;
> }
> }
> }
> }
>
> That probbaly should be included in dynapi as it's
> really annoying.
>
> Benoit
>
> On Sunday, February 23, 2003, at 06:19 PM, Dan
> Willemsen wrote:
>
> > One thing that I noticed while looking at the demo
> was, that sometimes,
> > in Mozilla 1.0.1(Linux), mozilla picks up its own
> drag-and-drop code,
> > trying to drag the image, while interupting
> dynapi's drag and drop
> > functions. I don't see a way to fix this, unless
> there is a handle in
> > the mozilla code somewhere to disable image drags,
> that can be accessed
> > via javascript.
> >
> > Just my two cents.
> >
> > Dan W
> >
> > On Sun, 2003-02-23 at 19:49, Raymond Irving wrote:
> >> Hello Everyone,
> >>
> >> I've added a few new events to the DragEvent
> object.
> >> they are as follows:
> >>
> >> ondrop, ondragover and ondragout
> >>
> >> You can see a live demo here:
> >>
> >>
>
http://www24.brinkster.com/dyntools/next/examples/demo.dragover.html
> >>
> >> and you can download the changes here:
> >>
> >>
>
http://www24.brinkster.com/dyntools/next/dynapi3x.zip
> >>
> >> Questions:
> >> -----------
> >>
> >> 1) Should we leave the ondrop, ondragover, etc
> code
> >> inside the dragevent.js? Or should we move it
> into
> >> dragdrop?
> >>
> >> 2) What do you think about the drag-over stealth
> mode?
> >>
> >> Any other comments?
> >>
> >>
> >> --
> >> Raymond Irving
> >>
> >>
> >>
> >>
> __________________________________________________
> >> Do you Yahoo!?
> >> Yahoo! Tax Center - forms, calculators, tips,
> more
> >> http://taxes.yahoo.com/
> >>
> >>
> >>
>
-------------------------------------------------------
> >> This SF.net email is sponsored by: SlickEdit Inc.
> Develop an edge.
> >> The most comprehensive and flexible code editor
> you can use.
> >> Code faster. C/C++, C#, Java, HTML, XML, many
> more. FREE 30-Day Trial.
> >> www.slickedit.com/sourceforge
> >> _______________________________________________
> >> Dynapi-Dev mailing list
> >> [EMAIL PROTECTED]
> >>
>
http://www.mail-archive.com/[EMAIL PROTECTED]/
> > --
> > Dan Willemsen <[EMAIL PROTECTED]>
> >
> >
> >
> >
>
-------------------------------------------------------
> > This SF.net email is sponsored by: SlickEdit Inc.
> Develop an edge.
> > The most comprehensive and flexible code editor
> you can use.
> > Code faster. C/C++, C#, Java, HTML, XML, many
> more. FREE 30-Day Trial.
> > www.slickedit.com/sourceforge
> > _______________________________________________
> > Dynapi-Dev mailing list
> > [EMAIL PROTECTED]
> >
>
http://www.mail-archive.com/[EMAIL PROTECTED]/
> >
>
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[EMAIL PROTECTED]/