mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 07:38:53 +02:00
Revert "fix: close context menu when clicking items with submenus"
This reverts commit 2f93af4d6fdb89ba0773385c646db817ded2bf29.
This commit is contained in:
parent
22835108be
commit
61ec341c27
@ -62,7 +62,7 @@ class ContextMenu {
|
|||||||
if (this.isMobile) {
|
if (this.isMobile) {
|
||||||
this.$cover.on("click", () => this.hide());
|
this.$cover.on("click", () => this.hide());
|
||||||
} else {
|
} else {
|
||||||
$(document).on("mouseup", (e) => this.hide());
|
$(document).on("click", (e) => this.hide());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,10 +225,9 @@ class ContextMenu {
|
|||||||
$item.on("mouseup", (e) => {
|
$item.on("mouseup", (e) => {
|
||||||
// Prevent submenu from failing to expand on mobile
|
// Prevent submenu from failing to expand on mobile
|
||||||
if (!this.isMobile || !("items" in item && item.items)) {
|
if (!this.isMobile || !("items" in item && item.items)) {
|
||||||
|
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.
|
||||||
if (("command" in item) || ("handler" in item)) {
|
this.hide();
|
||||||
this.hide();
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user