yeah that script works because he is using 'mousedown'....


On Tue, Sep 16, 2008 at 4:55 AM, Iván N Paz <[EMAIL PROTECTED]> wrote:

> I tested it on winxp + FF3... Took most of the idea from ddMenu...
>
> Site: http://webhike.de/moo/
> Demo: http://webhike.de/scripts/dd/ddmenu.html
>
> See if you can use his demo on contextmenu, I think he has some
> workarrounds for different browsers/platforms....
>
>
> On 9/15/08, Nathan White <[EMAIL PROTECTED]> wrote:
> > I cannot reproduce this even on FF2 on a Mac.
> >
> > I used the addEventListener instead of mootools addEvent because I wanted
> to
> > get at the native event object for several reasons.
> > 1. ) To rule out any anomalies with events in mootools.
> >  2. ) To look for a work around for FF3 Mac.
> >
> > Anyways... I did some more research and the closest thing I found was a
> > ticket in the dojo toolkit (
> > http://trac.dojotoolkit.org/ticket/7095 )
> >
> > This page ( http://unixpapa.com/js/testmouse.html ) will
> > show that on FF3 mac contextmenu doesn't get fired.
> >
> > The work around I have found right now is to use 'mousedown' instead on
> > 'contextmenu' and test event.rightClick.
> >
> >
> >
> >
> > On Mon, Sep 15, 2008 at 8:37 PM, Iván N Paz <[EMAIL PROTECTED]> wrote:
> > >
> > > I didnt ask 1st.. Is there any special reason to use the
> > > addEventListener(...) instead of mootools addEvent(...)
> > >
> > > This code works for me:
> > >
> > >
> > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> > >
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> > > <html>
> > > <head>
> > > <title></title>
> > > <script type="text/javascript"
> > > src="assets/scripts/mootools-1.2-core.js"></script>
> > > <script type="text/javascript"
> > > src="assets/scripts/mootools-1.2-more.js"></script>
> > >
> > > <script>
> > > function clicked(e)
> > > {
> > >        if(e.button == 2){
> > >                console.debug('right clicked');
> > >        } else {
> > >                console.debug('left clicked');
> > >        }
> > > }
> > >
> > > window.addEvent('domready',function(){
> > >
> > >        var d = new Element('div',{
> > >                'styles' : { 'border' : '1px solid #999', 'height' :
> 300,
> > 'width' : 400}
> > >        }).injectInside(document.body);
> > >
> > >        // change d to document to show right click detection
> > >        //d = document; <-- if uncommented, right triggers twice...
> > >
> > >        d.addEventListener('click', clicked, false);
> > >        d.addEventListener('contextmenu', clicked, false);
> > >
> > >
> > >
> > >
> > > });
> > > </script>
> > > </head>
> > > <body>
> > > </body>
> > > </html>
> > >
> >
> >
>
>
> --
> ◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦
> www.ivanicus.com
>

Reply via email to