关闭为mozilla浏览器创建的上下文菜单 [英] close a context menu which is created for mozilla browser

查看:66
本文介绍了关闭为mozilla浏览器创建的上下文菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我使用以下代码在mozilla中创建了一个上下文菜单:

Hello,
I have created a context menu in mozilla by using following code:

展开 | 选择 | 换行 | 行号

推荐答案

嗨...


首先用以下代码替换你的第71行:

hi ...

first replace your line 71 with:

展开 | 选择 | Wrap | 行号



hi ...


first用以下代码替换你的第71行:

hi ...

first replace your line 71 with:

展开 | 选择 | Wrap | 行号


nope ...我在FF 2.0.0.11中再次测试了它...当您在窗口中右键单击时,将在mous-pos创建一个新的上下文菜单,同时关闭旧的上下文菜单...右键单击是点击也是这样点击处理程序将被调用然后出现oncontext-menu并创建一个新的...


如果你想确保只有一个contextMenu可见然后把:

nope ... i tested it again in FF 2.0.0.11 ... and when you right-click in the window a new context-menu is created at the mous-pos while the old one is closed ... the right-click is a click too so the click-handler will be called and then the oncontext-menu appears and creates a new one ...

in case you want to ensure that only one contextMenu will be visible then put:

展开 | 选择 | Wrap | 行号


这篇关于关闭为mozilla浏览器创建的上下文菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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