{{error}}
{{(quickSearchResults.length>10)?'10+':(quickSearchResults.length)}} {{(quickSearchResults.length==1)?'result':'results'}}
{{result.title}} {{result.timeStamp | mysql2ymd }}
I am sorry, no such article was written yet.
Right click functionality on some buttons - how to, and demo
Right click functionality on some buttons - how to, and demo
To use at best the screen estate it is indicated sometimes to implement right-click handlers that trigger menus or other activities.

Recently I thought implementing such functionality on http://my.sorescu.eu/. The functionality implemented was triggering a dialogue box; the complete functionality is still under development, but the right-click handler has been implemented.

First, I looked for a library, and I found one that looked nice and simple (implemented using jQuery): http://www.abeautifulsite.net/blog/2008/05/jquery-right-click-plugin/#demo.

I am using Google Chrome right now to test it, and I saw the following misbehaviour: if I right-click on the "MY Place" button after right-dragging, I get the event triggered multiple times.

I patched the code by inserting a line after line 53:
$(this).mousedown( function(e) {
					var evt = e;
					$(this).unbind('mouseup');//added by dragos-matei@sorescu.eu to avoid double right click events, or ghost right clicks for right dragging events starting from this button
					$(this).mouseup( function() {
						$(this).unbind('mouseup');
						if( evt.button == 2 ) {
							handler.call( $(this), evt );
							return false;
						} else {
							return true;
						}
					});
				});
The issue seems to be in the original code that every time the  rightMouseDown   occurs, a new  rightMouseUp handler is added. 
What I did was to remove the rightMouseUp event also when rightMouseDown event.

Thanks to http://www.abeautifulsite.net and I hope it was useful for you.

N.B.: No guarantee that the script in discussion and the modification I did is useful, safe, good, or whatever else - just take it without any warranty, of any kind, under any circumstances.