Open adf-document-list's context menu on click instead of right click

Showing results for 
Search instead for 
Did you mean: 
Established Member

Open adf-document-list's context menu on click instead of right click

Hello Team,

I am using  ADF 6.10 (Alfresco Content App), Alfresco Content Services 23.2.
I have found that Alfresco file list component (files.component.html), that have adf-document-list component which opens context menu on right click,

          [sorting]="['name', 'asc']"

It's using directive acaContextActions which is having HostListener which opens context menu on right click 


 @HostListener('contextmenu', ['$event'])
  onContextMenuEvent(event: MouseEvent) {
    if (event) {

      if (this.enabled) {
        const target = this.getTarget(event);
        if (target) {
          this.execute(event, target);



I tried by putting click event HostListener - @HostListener('click', ['$event']), but it is not working properly.
It opens context menu but it blocks the multiselect feature of file / folder selection because it's listen click event and prevents the checkbox events.


It also sometimes opens contextmenu but it takes the wrong row / node reference and opens context menu of other nodes.

I also tried with mousedown event as well but none of them are working properly.

  @HostListener('click', ['$event'])
  onContextMenuClickEvent(event: MouseEvent) {
    if (event.which !== 3) {
      if (this.enabled) {
        const target = this.getTargetFromEvent(event);
        if (target) {
          if (this.isEmptyTable(target)) {
            return null;

I wanted to implement the same behaviour of conext menu as we got the menu items on right click by doing a click.
Please help / suggest the customization or changes required to achieve this solution.