custom-context-menu
Advanced tools
Comparing version 1.3.5 to 1.3.6
15
cm.js
@@ -278,7 +278,12 @@ function ContextMenu(target, params) { | ||
} else { | ||
node.addEventListener("mouseup", (event) => { | ||
// close all the CMs and then execute the given function | ||
this._getRoot().close(); | ||
item.function(); | ||
}, false); | ||
// this timeout is needed to prevent an item to be treated as | ||
// "mouseupped" in case of random mouse movement right after | ||
// the CM has been opened | ||
setTimeout(() => { | ||
node.addEventListener("mouseup", (event) => { | ||
// close all the CMs and then execute the given function | ||
this._getRoot().close(); | ||
item.function(); | ||
}, false); | ||
}, 100) | ||
} | ||
@@ -285,0 +290,0 @@ |
{ | ||
"name": "custom-context-menu", | ||
"version": "1.3.5", | ||
"version": "1.3.6", | ||
"description": "A small (<2kB minified and gzipped) tool with no dependencies that helps you create custom rightclick context menues.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20490
488