Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6208] iOS: onItemclick ListView event not triggering with buttons

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionDone
Resolution Date2019-05-01T22:37:10.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterZachary Litten
AssigneeShak Hossain
Created2019-04-12T18:49:24.000+0000
Updated2019-05-01T22:37:10.000+0000

Description

I have a template in a ListView which contains a button. The onItemclick event of the ListView is not getting triggered when clicking the button in the ListItem, however all other elements in the template are triggered the itemclick fine. This is only an issue on iOS and not Android. I have included a sample app demonstrating the issue.

Attachments

FileDateSize
itemclick_issue.zip2019-04-12T18:45:14.000+00008664080

Comments

  1. Vijay Singh 2019-04-12

    [~zlitten] If you want to get 'onItemClick' event on click of button, you can disable touch event on button using property [touchEnabled](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-property-touchEnabled). Update index.xml with -
       	<Button bindId="btn" class="buttonContainer" touchEnabled="false"/>
       
    I think it should not be bug. It is similar to native behavior. Was it working in any previous versions?
  2. Zachary Litten 2019-04-15

    I can't confirm if it was working previously as these are new changes to replace actionable Labels with Buttons to ensure they have the correct accessibility role. Thank you for providing the fix. I suppose it's not a bug if you are saying that it is native behavior, but I feel the discrepancy in implementation between platforms should at least be noted somewhere in the documentation to help someone else avoid the confusion.
  3. Vijay Singh 2019-04-16

    Sure [~zlitten]. We'll make the required change in document. Thanks!

JSON Source