mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-28 02:22:26 +08:00
fix(client): context menu dismissing on mobile (closes #2128)
This commit is contained in:
parent
f527b13973
commit
e56e3595a8
@ -192,13 +192,16 @@ class ContextMenu {
|
|||||||
// it's important to stop the propagation especially for sub-menus, otherwise the event
|
// it's important to stop the propagation especially for sub-menus, otherwise the event
|
||||||
// might be handled again by top-level menu
|
// might be handled again by top-level menu
|
||||||
return false;
|
return false;
|
||||||
})
|
});
|
||||||
.on("mouseup", (e) =>{
|
|
||||||
|
if (!this.isMobile) {
|
||||||
|
$item.on("mouseup", (e) =>{
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
// Hide the content menu on mouse up to prevent the mouse event from propagating to the elements below.
|
// Hide the content menu on mouse up to prevent the mouse event from propagating to the elements below.
|
||||||
this.hide();
|
this.hide();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if ("enabled" in item && item.enabled !== undefined && !item.enabled) {
|
if ("enabled" in item && item.enabled !== undefined && !item.enabled) {
|
||||||
$item.addClass("disabled");
|
$item.addClass("disabled");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user