diff --git a/api/js/egw_action/egw_action_popup.js b/api/js/egw_action/egw_action_popup.js index 29950e5de7..c490e8be31 100644 --- a/api/js/egw_action/egw_action_popup.js +++ b/api/js/egw_action/egw_action_popup.js @@ -301,6 +301,8 @@ export function egwPopupActionImplementation() _callback(event); } }); + // bind a custom event tapandhold to be able to call it from nm action button + _node.addEventListener('tapandhold', _event=>{_callback(_)}); } /** * Registers the handler for the context menu @@ -324,7 +326,7 @@ export function egwPopupActionImplementation() { _egw_active_menu.hide(); } - else if (!e.ctrlKey && e.which == 3 || e.which === 0) // tap event indicates by 0 + else if (!e.ctrlKey && e.which == 3 || e.which === 0 || e.type === 'tapandhold') // tap event indicates by 0 { var _xy = ai._getPageXY(e); var _implContext = {event:e, posx:_xy.posx, posy: _xy.posy}; diff --git a/api/js/etemplate/et2_extension_nextmatch.ts b/api/js/etemplate/et2_extension_nextmatch.ts index c1cb4a623f..7b89d2af9d 100644 --- a/api/js/etemplate/et2_extension_nextmatch.ts +++ b/api/js/etemplate/et2_extension_nextmatch.ts @@ -3440,12 +3440,10 @@ export class et2_nextmatch_header_bar extends et2_DOMWidget implements et2_INext .hide() .click(function(e) { - // @ts-ignore - jQuery('tr.selected', self.nextmatch.getDOMNode()).trigger({ - type: 'contextmenu', - which: 3, - originalEvent: e - }); + if (self.nextmatch.getDOMNode().getElementsByClassName('selected').length>0) + { + self.nextmatch.getDOMNode().getElementsByClassName('selected')[0].dispatchEvent(new CustomEvent("tapandhold",{type:'tapandhold'})); + } }) .prependTo(this.search_box); }