Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/jquery.contextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,9 @@

e.preventDefault();

// If you click it very fast beetwen two or more buttons the layer get bugged
removeContextMenuLayer();

setTimeout(function () {
// If the click is not real, things break: https://github.com/swisnl/jQuery-contextMenu/issues/132
if(fakeClick){
Expand Down Expand Up @@ -2126,3 +2129,13 @@
$.contextMenu.op = op;
$.contextMenu.menus = menus;
});


// If you click too fast beetwen two or more buttons, the layer on top of the everything stay bugged.
// Calling this function solve the problem removing the layer
// You can try fast right clicking multiple times here https://swisnl.github.io/jQuery-contextMenu/demo/on-dom-element.html
function removeContextMenuLayer(){
$('#context-menu-layer').remove();
$('#context-menu-layer .context-menu-list').remove();
}