通过Javascript捕捉右键点击,不需要wmode [英] capture right click through Javascript, withouth wmode

查看:183
本文介绍了通过Javascript捕捉右键点击,不需要wmode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用除英语以外的任何其他语言的情况下,Flash Player在Firefox / Chrome中使用除wmode =window以外的任何其他内容都存在错误。这个错误已经被报告,并且还没有被修复

http://bugs.adobe.com/jira/browse/FP-501
$ p
$ b

$
$ b

http:/ / /www.5etdemi.com/blog/archives/2005/06/firefox-wmodetransparent-is-completely-screwy-and-breaks-textfields /



现在对我的问题 - 即时通讯尝试使用Uza的右键点击解决方案( http://www.uza.lt/blog/2007/08/solved-right-click-in-as3 )在我的应用程序,但我坚持wmode的问题。事件捕获似乎不工作与wmode =窗口,我需要多种语言来处理我的应用程序。



有没有解决方案,任何人都有确定了吗?或者有没有什么办法可以在不设置wmode的情况下捕获右键点击。



任何帮助将不胜感激。幸运的是,你最常想知道是否点击了正确的按钮。由于W3C和微软达成了一致,并给出了一个值为2,你仍然可以检测到一个右键单击。

 函数doSomething(e){
var rightclick;
if(!e)var e = window.event;
if(e.which)rightclick =(e.which == 3);
else if(e.button)rightclick =(e.button == 2);
alert('Rightclick:'+ rightclick); // true或false
}

http://www.rgagnon.com/jsdetails/js-0061.html



http://www.quirksmode.org/js/events_properties.html



http://unixpapa.com/js/ mouse.html
http://www.javascripter.net/faq/leftvsri.htm

Flash player has a bug in using anything other than wmode="window" in Firefox/Chrome when using any other language than English. This bug is reported and not fixed yet

http://bugs.adobe.com/jira/browse/FP-501

The issue can be seen better here -

http://www.5etdemi.com/blog/archives/2005/06/firefox-wmodetransparent-is-completely-screwy-and-breaks-textfields/

Now to my problem - im trying to use Uza's right click solution ( http://www.uza.lt/blog/2007/08/solved-right-click-in-as3 ) in my application, but am stuck with problem of wmode. The event capturing doesnt seem to work with wmode="window" and i need multiple languages to work on my app as well.

Is there any solution to this that anyone has identified? Or is there any way that the right click can be captured without setting wmode.

Any help will be greatly appreciated. Thanks!!

解决方案

Fortunately you most often want to know if the right button has been clicked. Since W3C and Microsoft happen to agree on this one and give button a value of 2, you can still detect a right click.

function doSomething(e) {
    var rightclick;
    if (!e) var e = window.event;
    if (e.which) rightclick = (e.which == 3);
    else if (e.button) rightclick = (e.button == 2);
    alert('Rightclick: ' + rightclick); // true or false
}

http://www.rgagnon.com/jsdetails/js-0061.html

http://www.quirksmode.org/js/events_properties.html

http://unixpapa.com/js/mouse.html http://www.javascripter.net/faq/leftvsri.htm

这篇关于通过Javascript捕捉右键点击,不需要wmode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆