right click triggering the click listener for an atom

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

right click triggering the click listener for an atom

Skar-3
Hi,

I'm using an atom with a "click" listener which shows the full msg in a pop-up window. However, the listener is called even if I right-clicked on the atom. I want the action to happen only with the left click and http://demo.qooxdoo.org/devel/apiviewer/#qx.ui.basic.Atom says:

<h3 onclick="apiviewer.ObjectRegistry.getObjectFromHashCode('cp').toggleShowItemDetails('click','qx.ui.core.Widget')">click

Widget is clicked using the left mouse button.

Inherited from:
<a target="_blank" style="" href="http://demo.qooxdoo.org/devel/apiviewer/#qx.ui.core.Widget#click" onclick="apiviewer.ui.ClassViewer.instance._onSelectItem('qx.ui.core.Widget#click'); return false;" title="qx.ui.core.Widget#click">qx.ui.core.Widget#click
So only the left click should cause the click event. But the right click also causes the event. Why?

The playground snippet is:

APP =  this;
APPROOT =  this.getRoot();
var atom = new qx.ui.basic.Atom("click me").set({
  rich: true
});
atom.setNativeContextMenu(true);
atom.setSelectable(true);
atom.addListener("click", function(e){
  alert("Atom clicked!!!");
}, this);
APPROOT.add(atom, {top:10, left: 10});

     

cheers,
skar.
-- 
--
The life so short, the craft so long to learn. 

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: right click triggering the click listener for an atom

Fabian Jakobs
Administrator
Hi skar,


I'm sorry but the documentation for the widget is wrong. Click is fired
for the right mouse button as well. You can detect the mouse button with
the "getButton()" method on the mouse event object. I will update the
documentation.

Best Fabian

> Hi,
>
> I'm using an atom with a "click" listener which shows the full msg in
> a pop-up window. However, the listener is called even if I
> right-clicked on the atom. I want the action to happen only with the
> left click and
> http://demo.qooxdoo.org/devel/apiviewer/#qx.ui.basic.Atom says:
>
>>
>>       click
>>
>> Widget is clicked using the left mouse button.
>>
>> Inherited from:
>> qx.ui.core.Widget#click
>> <<a href="http://demo.qooxdoo.org/devel/apiviewer/#qx.ui.core.Widget#click">http://demo.qooxdoo.org/devel/apiviewer/#qx.ui.core.Widget#click>
> So only the left click should cause the click event. But the right
> click also causes the event. Why?
>
> The playground snippet is:
>
>> APP =  this;
>> APPROOT =  this.getRoot();
>> var atom = new qx.ui.basic.Atom("click me").set({
>>   rich: true
>> });
>> atom.setNativeContextMenu(true);
>> atom.setSelectable(true);
>> atom.addListener("click", function(e){
>>   alert("Atom clicked!!!");
>> }, this);
>> APPROOT.add(atom, {top:10, left: 10});
>>
>>      
>
> cheers,
> skar.
> --
> --
> The life so short, the craft so long to learn.
>  
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>  


--
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
Telefon: +49 721 91374-6784
[hidden email]

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: right click triggering the click listener for an atom

Skar-3
Fabian Jakobs wrote:
> Hi skar,
>
>
> I'm sorry but the documentation for the widget is wrong. Click is fired
> for the right mouse button as well. You can detect the mouse button with
> the "getButton()" method on the mouse event object. I will update the
> documentation.
>  
Thanks for the info. The right click for an atom doesn't generate the
"click" event under opera 10.01 build 4682 under karmic. I'm using trunk
20606. Also, since the last few days, the atom's label isn't selectable
or copied both under FF 3.5.5 and opera

The snippet is:

>
> main  : function() {
>       // Call super class
>       this.base(arguments);
>
>       // Enable logging in debug variant
>       if (qx.core.Variant.isSet("qx.debug", "on")) {
>           // support native logging capabilities, e.g. Firebug for Firefox
>           qx.log.appender.Native;
>           // support additional cross-browser console. Press F7 to
> toggle visibility
>           qx.log.appender.Console;
>       }
>
>       APP =  this;
>       APPROOT =  this.getRoot();
>       this.atom = new qx.ui.basic.Atom("i'm an atom. click me").set({
>         rich                : true,
>         nativeContextMenu   : true,
>         selectable          : true
>       });
>       this.atom.addListener("click", function(e){
>         this.debug("Atom clicked with button:" + e.getButton() + " ...");
>         alert("Atom clicked with button:" + e.getButton() + " ...");
>       }, this);
>       APPROOT.add(this.atom, {left: 100, top: 100});
>     }
>   }

cheers,
skar.

--
--
The life so short, the craft so long to learn.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: right click triggering the click listener for an atom

Skar-3
In reply to this post by Fabian Jakobs
Hi Fabian,
> Hi skar,
>
>
> I'm sorry but the documentation for the widget is wrong. Click is fired
> for the right mouse button as well. You can detect the mouse button with
> the "getButton()" method on the mouse event object. I will update the
> documentation.
>  
The getButton is returning left, even when I click with the right
button. I'm using trunk 20606 and I tested it under both FF 3.5.5 and
opera 10.01 build 4682 under karmic.

cheers,
skar.

--
--
The life so short, the craft so long to learn.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: right click triggering the click listener for an atom

Fabian Jakobs
Administrator
Hi,

this is strange. Can you open bugs for all of your issues? This looks
like a bug to me.

Best Fabian

> Hi Fabian,
>  
>> Hi skar,
>>
>>
>> I'm sorry but the documentation for the widget is wrong. Click is fired
>> for the right mouse button as well. You can detect the mouse button with
>> the "getButton()" method on the mouse event object. I will update the
>> documentation.
>>  
>>    
> The getButton is returning left, even when I click with the right
> button. I'm using trunk 20606 and I tested it under both FF 3.5.5 and
> opera 10.01 build 4682 under karmic.
>
> cheers,
> skar.
>
>  


--
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
Telefon: +49 721 91374-6784
[hidden email]

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: right click triggering the click listener for an atom

Skar-3
Fabian Jakobs wrote:
> Hi,
>
> this is strange. Can you open bugs for all of your issues? This looks
> like a bug to me.
>  
The bug is 3049. Also, a rich label's text can be selected and copied,
but not for an atom. Is that a feature or a bug too?

cheers,
skar.

--
--
The life so short, the craft so long to learn.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel