原文地址:[url]http://stackoverflow.com/questions/6788566/jquery-context-menu-clashes-with-jquery-draggable[/url]
将contextmenu源代码改变:
改变为:
将contextmenu源代码改变:
$(this).mousedown( function(e) {
var evt = e;
evt.stopPropagation();
$(this).mouseup( function(e) {
e.stopPropagation();
var srcElement = $(this);
$(this).unbind('mouseup');
if( evt.button == 2 ) {
// Hide context menus that may be showing
$(".contextMenu").hide();
改变为:
$(this).mousedown( function(e) {
var evt = e;
if( evt.button != 2 ) {
return;
}
evt.stopPropagation();
$(this).mouseup( function(e) {
e.stopPropagation();
var srcElement = $(this);
$(this).unbind('mouseup');
if( evt.button == 2 ) {
// Hide context menus that may be showing
$(".contextMenu").hide();