mirror of
https://github.com/zadam/trilium.git
synced 2025-06-05 01:18:44 +02:00
fix click events propagating from context menu being closed, fixes #3805
(cherry picked from commit e871edc8f347e6add552abe67d94a68793558802)
This commit is contained in:
parent
32e9fd291d
commit
24866a3e25
@ -142,7 +142,9 @@ class ContextMenu {
|
||||
// "contextmenu" event also triggers "click" event which depending on the timing can close just opened context menu
|
||||
// we might filter out right clicks, but then it's better if even right clicks close the context menu
|
||||
if (Date.now() - this.dateContextMenuOpenedMs > 300) {
|
||||
this.$widget.hide();
|
||||
// seems like if we hide the menu immediately, some clicks can get propagated to the underlying component
|
||||
// see https://github.com/zadam/trilium/pull/3805 for details
|
||||
setTimeout(() => this.$widget.hide(), 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user