Hide the content menu on mouse up

pull/1861/head
SiriusXT 2025-05-06 20:40:13 +07:00
parent 4f42be3647
commit 2436838aae
1 changed files with 6 additions and 0 deletions

@ -192,6 +192,12 @@ class ContextMenu {
// it's important to stop the propagation especially for sub-menus, otherwise the event
// might be handled again by top-level menu
return false;
})
.on("mouseup", (e) =>{
e.stopPropagation();
// Hide the content menu on mouse up to prevent the mouse event from propagating to the elements below.
this.hide();
return false;
});
if ("enabled" in item && item.enabled !== undefined && !item.enabled) {