tableView's onRowTouch fires two times if tap just a bit above the line (row separator)

If this is for the PC or MAC then the event.phases woudl be like this

local function onRowTouch(event) local row = event.target if event.phase == "down" then local rowIndex = event.target.index print("Row Index: " .. rowIndex) elseif event.phase == "up" then print("hello") end return true end

And what is your event listener?

Hi,

event.phase doesn’t have “began” and “ended”.

onRowTouch (optional)

Listener. The function used to listen for TableView touch/tap events. In this listener function, the event.phase values include “tap”, “press”,“release”, “swipeLeft”, and “swipeRight”. In addition, event.target is a reference to the row that was interacted with andevent.target.index is the index number of that row.

So far, no problem with “press” and “release”.

Thanks,

So Lin

I’m on MAC.

What do you mean event.phase doesnt have began and ended…

https://docs.coronalabs.com/api/event/touch/phase.html

Whats your question again? Im lost…

I’m using tableView widget. You can read my first post again :slight_smile:

Thanks,

So Lin

Hi So Lin,

So, you’re tapping specifically inside the divider line, not even 1-2 pixels outside of it?

Brent

As a side note, I personally never use the built-in divider lines with tableViews… I merely render my own lines (or alternate the row colors slightly) within each row. Of course, if the divider line IS registering a tap on consecutive rows, we’ll need to investigate why…

Brent

Hi Brent,

It can be reproduced on computer (I’m using MAC). Just point the mouse pointer a bit above the divider line and tap. It seems to be ok on device anyway.

Thanks,

So Lin

Hi So Lin,

I was able to reproduce this… well, only in the Simulator, but that means it could potentially occur on a device.

In any case, I should have a fix for this included in an upcoming daily build.

Thanks,

Brent

Hi Brent,

Thank you for looking into this. Even if it only happens with Simulator, it should be fixed because it may cause confusion and debugging headache.

Thanks,
So Lin

Hi So Lin,

The fix should be in the next daily build (#2709; check the notes though). If you find that this still doesn’t resolve the issue, please post back here.

Brent