fix(client): context menu dismissing on mobile (closes #2128)

pull/2083/head^2
Elian Doran 2025-06-05 19:14:50 +07:00
parent f527b13973
commit e56e3595a8
No known key found for this signature in database
1 changed files with 5 additions and 2 deletions

@ -192,13 +192,16 @@ 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) =>{
});
if (!this.isMobile) {
$item.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) {
$item.addClass("disabled");