Fix broken 3dots menu for nm in mobile theme

This commit is contained in:
hadi 2023-05-02 18:53:32 +02:00
parent cbf47d7156
commit 8e8c664e95
2 changed files with 7 additions and 7 deletions

View File

@ -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};

View File

@ -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);
}