From 3294ae6fd45be2926b1e8396f41fccfc0717a479 Mon Sep 17 00:00:00 2001 From: Roland Soos Date: Thu, 21 Jan 2016 14:13:47 +0100 Subject: [PATCH] Simulate click on the element if the menu already open User opens the menu with right click, then he right click again on a different part, contextMenu should inform that "clicked, but hidden by $layer" element about the click event. In our system, we have one main contextMenu and our system contains an active item which can be selected by click. If this event not triggered, then the second right click not able to change the active item to the clicked one. --- src/jquery.contextMenu.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/jquery.contextMenu.js b/src/jquery.contextMenu.js index 6249d403..e7fa8662 100755 --- a/src/jquery.contextMenu.js +++ b/src/jquery.contextMenu.js @@ -453,6 +453,7 @@ if (document.elementFromPoint && root.$layer) { root.$layer.hide(); target = document.elementFromPoint(x - $win.scrollLeft(), y - $win.scrollTop()); + $(target).trigger('mousedown').trigger('mouseup'); root.$layer.show(); }