From 8be9ffa47ba81832f532472fc91a502646acded7 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 10 Jan 2025 11:03:06 -0700 Subject: [PATCH] Api: Don't block etemplate load load while creating context menu, let it defer --- api/js/egw_action/EgwPopupActionImplementation.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/api/js/egw_action/EgwPopupActionImplementation.ts b/api/js/egw_action/EgwPopupActionImplementation.ts index fe7ce41ba7..7f0f12f3cd 100644 --- a/api/js/egw_action/EgwPopupActionImplementation.ts +++ b/api/js/egw_action/EgwPopupActionImplementation.ts @@ -320,9 +320,14 @@ export class EgwPopupActionImplementation implements EgwActionImplementation { // Special handling for nextmatch: only build the menu once and just re-use it. if(!_context.menu && _context.actionLinks && _context.parent?.manager?.data?.nextmatch && !_context.parent.manager.data.menu) { - _context.parent.manager.data.menu = this._buildMenu(_context.actionLinks.filter(l => l.actionObj.type == "popup"), [_context], null); - _context.parent.manager.data.menu.showAt(0, 0); - _context.parent.manager.data.menu.hide(); + // Don't block load + _context.parent.manager.data.menu = {}; // Set it to something or it will do this for every row + window.setTimeout(() => + { + _context.parent.manager.data.menu = this._buildMenu(_context.actionLinks.filter(l => l.actionObj.type == "popup"), [_context], null); + _context.parent.manager.data.menu.showAt(0, 0); + _context.parent.manager.data.menu.hide(); + }, 0); } const contextHandler = (e) => { const x = _node