mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 23:29:02 +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) {
|
||||
this.$cover.on("click", () => this.hide());
|
||||
} else {
|
||||
$(document).on("mouseup", (e) => this.hide());
|
||||
$(document).on("click", (e) => this.hide());
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,10 +225,9 @@ class ContextMenu {
|
||||
$item.on("mouseup", (e) => {
|
||||
// Prevent submenu from failing to expand on mobile
|
||||
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.
|
||||
if (("command" in item) || ("handler" in item)) {
|
||||
this.hide();
|
||||
}
|
||||
this.hide();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user