Search code examples
sencha-touchsencha-touch-2sencha-touch-2.3

Sencha Touch: How to prevent button in list item from selecting list item


I have a list where each item has a "buy" button. The problem is that the click event for the button is passed to the list even if the button's handler returns false. How can I stop the list item from being selected when the button is clicked?

Thanks!


Solution

  • Try event.stopEvent(); in the button handler. This will call internally event.stopPropagation(); and event.preventDefault();