Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 4f42be3

Browse files
committed
Remove delays to close the right-click menu
1 parent 647a5c9 commit 4f42be3

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

apps/client/src/menus/context_menu.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,6 @@ class ContextMenu {
183183
return false;
184184
}
185185

186-
this.hide();
187-
188186
if ("handler" in item && item.handler) {
189187
item.handler(item, e);
190188
}
@@ -218,22 +216,13 @@ class ContextMenu {
218216

219217
async hide() {
220218
this.options?.onHide?.();
221-
// seems like if we hide the menu immediately, some clicks can get propagated to the underlying component
222-
// see https://github.com/zadam/trilium/pull/3805 for details
223-
await timeout(100);
224219
this.$widget.removeClass("show");
225220
this.$cover.removeClass("show");
226221
$("body").removeClass("context-menu-shown");
227222
this.$widget.hide();
228223
}
229224
}
230225

231-
function timeout(ms: number) {
232-
return new Promise((accept, reject) => {
233-
setTimeout(accept, ms);
234-
});
235-
}
236-
237226
const contextMenu = new ContextMenu();
238227

239228
export default contextMenu;

0 commit comments

Comments
 (0)