From aeff72e24a49f680bd59f9fa8f2b0752b27041ca Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 15 Aug 2012 13:26:12 +0300 Subject: [PATCH] little hack for getting mouse click little hack for getting mouse click when context menu is hiding, no need to set all event handlers to document --- lib/client/menu/jquery.contextMenu.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/client/menu/jquery.contextMenu.js b/lib/client/menu/jquery.contextMenu.js index 2b4da541..0ea7c70d 100644 --- a/lib/client/menu/jquery.contextMenu.js +++ b/lib/client/menu/jquery.contextMenu.js @@ -286,7 +286,8 @@ var // currently active contextMenu trigger mouseenter: function(e) { var $this = $(this), $related = $(e.relatedTarget), - $document = $(document); + //$document = $(document); + $document = $('li'); // abort if we're coming from a menu if ($related.is('.context-menu-list') || $related.closest('.context-menu-list').length) { @@ -1204,7 +1205,8 @@ $.contextMenu = function(operation, options) { // merge with default options var o = $.extend(true, {}, defaults, options || {}), - $document = $(document); + //$document = $(document); + $document = $('li'); switch (operation) { case 'create':