right-click

RIght-Click in GWT?

妖精的绣舞 提交于 2019-12-05 04:08:23
I am building an AJAX web app with GWT, and I want to use right-click for various things, just like in a desktop app. However, right-click produces the standard Web context menu and void onClick(ClickEvent event) never gets called. Has anyone figured out how to get this to work? thanks! 1-14x0r easy peasy, add a listener on the contextmenuhandler which will display a widget based on where the user right clicks. https://confluence.clazzes.org/pages/viewpage.action?pageId=425996 class MyWidget extends Composite implements ContextMenuHandler { // just an example, use a meaningful Widget here...

jQuery: preventDefault() not working on input/click events?

隐身守侯 提交于 2019-12-05 03:39:37
I want to disable the default contextMenu when a user right-clicks on an input field so that I can show a custom contextMenu. Generally speaking, its pretty easy to disable the right-click menu by doing something like: $([whatever]).bind("click", function(e) { e.preventDefault(); }); And in fact, I can do this on just about every element EXCEPT for input fields in FF - anyone know why or could point me towards some documentation? Here is the relevant code I am working with, thanks guys. HTML: <script type="text/javascript"> var r = new RightClickTool(); </script> <div id="main"> <input type=

How to properly handle left and right click in Firefox

情到浓时终转凉″ 提交于 2019-12-05 02:53:03
问题 I am working on a web app in which I want to have a different action happen to an element whether I left or right click on it. So I first added a function to handle the click event with jQuery, and then added a second function to handle the oncontextmenu attribute of my element. This is working well in Chrome & IE but causes a problem in Firefox: When I right click on an element, my function that handles the left click is surprisingly called, and then my function that handles the right click

How to hide the source code of a HTML page

放肆的年华 提交于 2019-12-05 02:06:25
问题 I created an HTML page and now would like to hide the source code and encrypt it. How can I do that? 回答1: You can disable the right click, but that's a bad idea because expert minds can read anything from your page. You cannot totally hide the page source - this is not possible. Nothing is secure enough on the Internet. In any case, you can encrypt it and set a password. You can utilise this link - it will encrypt your HTML page with a password. First up, disable the right click, by writing

Making an editable flowchart in Qt/C++

半世苍凉 提交于 2019-12-04 13:46:04
问题 I'm working on making a editable flowchart and I'm having a lot of issues conceptually with Qt. I've tried many different ways of implementing classes ranging from QTreeWidget , QTableWidget , and using just a bunch of easy QPushButtons . Ideally I'd like to have a setup where I can right click on each piece of the flow and edit it. In addition to having a drag and drop feature to rearrange the objects in the flow. Trying to find a class/group of classes I can use together to achieve this has

How to disable/enable a checkbox on right-click in chrome and firefox

半世苍凉 提交于 2019-12-04 12:13:03
I wrote some code which allows me to disable/enable checkboxes when I right-click them. It works in IE but not in Chrome or Firefox. rightClickFunc: function (e) { var obj; if ($.browser.msie) obj = event.srcElement; else obj = e.target; stuff.disableEnableObject(obj); return false; }, disableEnableObject: function (o) { if (o.getAttribute("disabled") == null) $('#'+o.id).attr("disabled", "disabled"); else $('#'+o.id).removeAttr("disabled"); } How can I get the same functionality in Chrome as IE? The problem seems to be that right clicking on a disabled item in chrome does open the context

Chrome extension: add option to right click menu when clicking certain HTML element

北城以北 提交于 2019-12-04 10:34:59
问题 I want to create a Chrome extension that adds an option to the right click menu when the user right clicks a certain HTML element (for example a DIV with a known ID). I would use this to add an option when the user right clicks a tweet on Twitter.com and that option would call a REST service. Is this posible with a regultar Chrome extension? 回答1: Yes, these are called Context Menus. You can find the docs for those here: https://developer.chrome.com/extensions/contextMenus 来源: https:/

Right click shortcut for Mac Lion OS?

随声附和 提交于 2019-12-04 10:07:18
问题 How to perform right click through Keyboard in Mac Lion OS? Since I am keyboard loving person, I don't like all the time use mouse for right click. I found much of the shortcuts of Mac through googling, but I didn't found this one. 回答1: Finally I got my answer: Go to System Preference --> Universal Access --> Mouse --> Enable Mouse Keys (ON) This will Enable you Numpad keys. Press Ctrl + 5 for Right Click. 回答2: Fn-Ctrl-I on laptop thanks to this post: https://discussions.apple.com/thread

Selenium WebDriver - How to Holds down the RIGHT mouse button?

不羁的心 提交于 2019-12-04 09:29:15
Using Selenium 2.0 WebDriver (java), I need to test some navigation (rotate, pan...) I need to be able to Holds down the RIGHT button while moving the mouse. Similarly, I need to be able to holds down the MIDDLE button while moving the mouse. It seems to be possible only with the LEFT button. Actions actions = new Actions(driver); actions.clickAndHold().perform(); Following question, i'm not dealing with any menu, button, widget but with a 3D Environment like GoogleMap where I need to simulate pan, rotate and zoom using MIDDLE button, RIGHT button and even Mouse wheel... Any Help? You can use

Custom context menu in d3 and svg

痴心易碎 提交于 2019-12-04 07:22:58
I would like to have custom context menu appearing when I right click on an svg circle. For now I have found this answer that helps me to handle the right click with the following code: .on("contextmenu", function(data, index) { //handle right click //stop showing browser menu d3.event.preventDefault() }); Now I would like to know how I can show a box containing some HTML. Thanks in advance. d3.select('#stock_details .sym').on("contextmenu", function(data, index) { var position = d3.mouse(this); d3.select('#my_custom_menu') .style('position', 'absolute') .style('left', position[0] + "px")