mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 02:52:27 +08:00
Hide the content menu on mouse up
This commit is contained in:
parent
4f42be3647
commit
2436838aae
@ -192,6 +192,12 @@ 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) =>{
|
||||||
|
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) {
|
if ("enabled" in item && item.enabled !== undefined && !item.enabled) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user