| Page 1 of 1 | [ 6 posts ] |
|
Hi,
I would like to know how do I detect which mouse button has been clicked? Looking for mousedown - e.which || e.button ... Ultimate goal is to disable right click in an window. Looking forward to guidence. Thanks, Sarbbottam. |
Alberto SantiniYUI Contributor
|
Hello Sarbbottam.
I provide a working example disabling right click on the body. http://www.pastie.org/1523262 There are different solutions. You can read about events [1] and contextmenu [2]. Regards, IceBox [1] http://developer.yahoo.com/yui/event/ [2] http://developer.yahoo.com/yui/menu/#usingcontextmenu |
|
Thanks Alberto,
May be I am silly, I could not find the desired (Disable Right Click) using YUI 3.x. The other reply of your using YUI 2.x seems a little confusing to me (novice user FrontEnd guy). Can you share any working example?? Thanks, |
|
Hi Alberto,
I wonder if there is any event called 'rightclick'??? Is there any event for right click??? For example: Y.on('click', function(e) { Y.log(e.button); }, '.numericText') Regards, Sarbbottam |
Alberto SantiniYUI Contributor
|
Hello Sarbbottam.
I am confused too. This is YUI2.x section and I posted a working example in the previous post. I applied an empty context menu to disable right click. There is not yet a similar solution for YUI3. So you should handle the right click, handling mouse down event in a similar way you did for key events. Debugging the event object may help you. Anyway, the follow-up in YUI3 section. Regards, IceBox |
Alberto SantiniYUI Contributor
|
|
| Page 1 of 1 | [ 6 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group