覆盖右键单击快捷菜单中的Web浏览器 - 利弊 [英] Overriding the right-click context menu in web browsers - pros and cons

查看:70
本文介绍了覆盖右键单击快捷菜单中的Web浏览器 - 利弊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在编写一个Web应用程序(而不是'只是'一个网站,但功能明智的一个真正的应用程序),并有下一个版本以下的讨论:


  • 我们的UI设计师想更换浏览器的右键快捷菜单(展示我们自己的菜单在适当情况下,或者没有菜单的),因为他想要的web应用程序更喜欢我们的(现有)的Windows应用程序

  • 我们的开发人员(和我)强烈反对,因为这是不好的做法,根本的东西,你不要在Web应用程序中做

因此​​,我在寻找更实的参数 - 像最佳实践准则,从信誉良好的任何声明,编码参数等等 - 这个问题,我希望能够用一次解决它,为的利弊并为所有...


解决方案

您不能这样做,反正可靠。在Firefox中,进入设置,内容的JavaScript /高级(我猜的字幕,没有英文火狐(;)来覆盖上下文菜单的行为和爆炸,你的应用程序不工作了,我的网上银行应用程序做了这他们的老版本,所以我不能做复制和放大器;用鼠标贴我讨厌它,所以我启用在Firefox的保护和它的工作种类的他们的新版本没有做这样的坏事了

相反,使用一个小的下拉箭头,在需要的上下文菜单,即可以被点击或只是盘旋,显示菜单。 JetBrains公司' TeamCity的的Web应用程序这是否很好。

We are programming a web application (not 'just' a web site, but functionality-wise a real application), and have the following discussion for the next release:

  • our UI designer wants to replace the browser's right-click context menu (showing our own menu where appropriate, or no menu at all) because he wants the web app to be more like our (existing) Windows app
  • our developers (and I) strongly object because this is bad practice, and simply something you do not do in a web application

Thus, I'm looking for "more solid" arguments - like best practice guidelines, any statements from reputable sources, coding arguments etc. - for the pros and cons of this issue, which I can hopefully use to resolve it once and for all...

解决方案

You can't do that reliably anyway. In Firefox, go to Settings, Contents, JavaScript/Advanced (I'm guessing the captions, no English Firefox (; ) to override context menu behaviour and bang, your app doesn't work anymore. My online-banking application did this in their old version, so I couldn't do copy & paste with the mouse. I hated it, so I enabled the protection in Firefox and it worked. Kind of. Their new version doesn't do such bad things anymore.

Instead, use a little drop-down arrow where a context menu is needed, that can either be clicked or just hovered over to show the menu. JetBrains' TeamCity web app does that very well.

这篇关于覆盖右键单击快捷菜单中的Web浏览器 - 利弊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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