Search code examples
javascriptcross-browsertabulator

Tabulator V 5.0.10+ cellTap not working on Chromium based browsers


Taking the following js script:


// Example function
function DoStuff(e, cell) {
    console.log("Do Stuff")
}

// Returning fontawesome icon
var Ico = function (cell, formatterParams, onRendered) { return '<i class="fas fa-trash-alt"></i>' }

//Table
var Table= new Tabulator("#anchor", {
    data: [],
    layout: "fitColumns",
    pagination: "local",
    responsiveLayout: "collapse",
    movableRows: true,
    columns: [
        { title: "Name", field: "Name", headerFilter: true, headerSort: false },
        { title: "Code", field: "Code", headerFilter: true, headerSort: false },
        { title: `<i class="fas fa-trash-alt"></i>`, headerSort: false, formatter: Ico, width: 25, hozAlign: "center", headerHozAlign: "center", cellClick: DoStuff, cellTap: DoStuff}
    ]
})

Expected behavior
On touch screens, X browser, cellTap should be called whenever a finger taps the table cell exactly as cellClick act when a click on the cell is performed.

Real behavior
On touch screens, Chromium based web browsers are not firing the Tap event and no js exception is thrown, tap event works as expected under Gecko based browsers

Recap
Docs (http://tabulator.info/docs/5.0/callbacks#cell) does not report anywhere that Chromium based browser are not supported. Before opening an issue under Github i opened a question here cause i might be done something wrong. Tested browser are the followings:

  • Firefox version 96.0.2 (64 bit) (Tap callback is working as expected, furthermore also cellClick works when a Tap is performed so cellTap is even useless)

  • Chrome version 97.0.4692.99 (Official build) (64 bit) TAP NOT WORKING

  • Edge version 44.18362.449.0 TAP NOT WORKING

  • Opera version 83.0.4254.19 TAP NOT WORKING

Thanks in advance for your time.


Solution

  • This was an issue with version 5.0 and has been resolved in the 5.1 release