tabulator icon indicating copy to clipboard operation
tabulator copied to clipboard

Incorrect context menu opening when scrolling on mobile

Open KorostelevKirill opened this issue 1 year ago • 5 comments

Describe the bug When scrolling a table on a mobile device, the row context menu opens.

Tabulator Info 6.2

Working Example https://tabulator.info/examples/6.2#menu

https://github.com/olifolkerd/tabulator/assets/49683449/d457597a-28d4-41fb-b31e-4725167d17fa

To Reproduce

Go to the above link Scroll down to the table Scroll the table vertically or horizontally

Expected behavior The row context menu should not open when scrolling the table.

Smartphone (please complete the following information):

Device: Any mobile device OS: android, ios Browser: Chrome Version: latest

Additional context In debugEventsExternal mode, when scrolling with the menu attached, two events are triggered: the scroll itself (vertical or horizontal) and rowTapHold. This appears to be a bug, as rowTapHold should not be triggered when scrolling.

KorostelevKirill avatar Apr 26 '24 06:04 KorostelevKirill

This is a critical bug and I am also facing this.

md-redwan-hossain avatar Oct 10 '24 03:10 md-redwan-hossain

@olifolkerd Can you kindly have a look?

md-redwan-hossain avatar Nov 13 '24 18:11 md-redwan-hossain

same problem. Is it only for the current versions

favouritesir avatar Mar 12 '25 02:03 favouritesir

@olifolkerd Can you kindly have a look?

but I got small fixed using the bellow technique. If you need you can try

const tableOpt = {
  isScroll: false,
};
const table = new Tabulator("#myTable", {
  /* other options */
  data,
  columns,
  rowContextMenu: () => {
    if (tableOpt.isScroll) {
      clearTimeout(tableOpt.scrollTimeout);
      tableOpt.scrollTimeout = setTimeout(() => {
        tableOpt.isScroll = false; 
      }, 500);
      return false;
    }
    return menu; // return your menu obj
  },
});
table.on("scrollVertical", function () {
  tableOpt.isScroll = true;
});

favouritesir avatar Mar 12 '25 05:03 favouritesir

This issue is sill a problem.

karpiq24 avatar Jul 12 '25 09:07 karpiq24