Hi Alexander,

Thanks for your suggestion! Anyway, it won't work too because the method
isPressLeft() calls getButton() too > return this.getButton() === "left";

The current code of getButton() is:

switch(this._type)
{
        case "click":
        case "dblclick":
          return "left";

        case "contextmenu":
          return "right";

        default:
          return this.__buttons[this._native.button] || "none";
}

Unless it is intentional for some reasons, maybe would it be better if it
was:

switch(this._type)
{
        case "contextmenu":
          return "right";

        default:
          return this.__buttons[this._native.button] || "none";
      }
}

?

Best,

Benoît.

Alexander Steitz wrote:
> 
> Hi Benoît,
> 
> On Sunday 10 January 2010 13:47:31 benco wrote:
>> Hello,
>> 
>> I noticed that the mouse type event class' getButton() method always
>>  returns 'left' on pure "click" events. This is a bit annoying because I
>>  must execute an action only if the clicked button is the left one... not
>>  the others...
>> 
>> Any idea or workaround ?
> Use the "isLeftPressed" method of the event instance.
> -> http://demo.qooxdoo.org/current/apiviewer/#qx.event.type.Mouse
> 
> cheers,
>   Alex
> 
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and
> easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/question-about-mouse-click-events-tp4281023p4284570.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to