"beforeContextmenuOpen" event doesn't get captured

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

"beforeContextmenuOpen" event doesn't get captured

voger
I have a strange problem and I really can't find how and why is
happening. I spent days on it and still can't find it.

I made this fiddle to show what I want to achieve. Mind that here it
works as expected http://tinyurl.com/mmk36rz

I get a nice console.log() both when the 'changeActive' and
'beforeContextmenuOpen' are captured.

In my real project I have to comment the 'changeActive' event listener
on the window object so 'beforeContextmenuOpen' can be captured on the
button. The muse events work fine.

I can't replicate the problem in the playground so I have uploaded my
project in github, hoping that someone may take the time to have a look
at it. The offending part is here
https://github.com/voger/qssite/blob/master/source/class/qssite/ui/STaskBar.js#L189

The logic is that a reference of the window object is a property of the
button object. Event listeners are set up for the window and an event
listener is set for the 'beforeContextmenuOpen'.

I am really curious as to what is wrong with this code.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: "beforeContextmenuOpen" event doesn't get captured

voger
It turns out the faulty line is this
https://github.com/voger/qssite/blob/master/source/class/qssite/ui/STaskBar.js#L194

button.setContextMenu(this.cmenu(button));

Which is strange because it doesn't do any harm in other window events.

On 19/03/2015 02:26 πμ, voger wrote:

> I have a strange problem and I really can't find how and why is
> happening. I spent days on it and still can't find it.
>
> I made this fiddle to show what I want to achieve. Mind that here it
> works as expected http://tinyurl.com/mmk36rz
>
> I get a nice console.log() both when the 'changeActive' and
> 'beforeContextmenuOpen' are captured.
>
> In my real project I have to comment the 'changeActive' event listener
> on the window object so 'beforeContextmenuOpen' can be captured on the
> button. The muse events work fine.
>
> I can't replicate the problem in the playground so I have uploaded my
> project in github, hoping that someone may take the time to have a look
> at it. The offending part is here
> https://github.com/voger/qssite/blob/master/source/class/qssite/ui/STaskBar.js#L189
>
> The logic is that a reference of the window object is a property of the
> button object. Event listeners are set up for the window and an event
> listener is set for the 'beforeContextmenuOpen'.
>
> I am really curious as to what is wrong with this code.
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel