Incorrect context menu opening when scrolling on mobile
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.
This is a critical bug and I am also facing this.
@olifolkerd Can you kindly have a look?
same problem. Is it only for the current versions
@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;
});
This issue is sill a problem.