Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-4820

ListItem does not bubble Switch Element


    • Type: Bug
    • Status: Closed
    • Resolution: Needs more info
    • Affects Version/s: None
    • Component/s: Alloy
    • Environment:

      iOS 10.1, Ti SDK 6.0.1, Alloy 1.9.5


      I'm using a ListView with a custom ListItem template, however, the "itemclick" event does not trigger on the parent ListView element, when I click the Switch element which is part of the ListItem.

          <ItemTemplate name="template">
                  <Label id="notification" width=100 backgroundColor="#faa" bindId="notification" />
                  <Switch id="toggleable" bindId="toggleable" bubbleParent="true" />

      • Clicking the "notification" element triggers fine on the 'itemclick' event ( {"bindId": "notification"}

        is available).

      • Clicking on the ListItem itself (neither clicking the Label/Switch) triggers 'itemclick', however does not give a bindId, as expected
      • Clicking the "toggleable" element does not trigger 'itemclick' at all

      Adding `touchEnabled="false"` to the Switch element does seem to trigger the itemclick event, however this does not change the value of the switch.

      In addition (unrelated to the bug), the docs do not explicitly say a "Ti.UI.View" element is supported within a ListItem (as seen in http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListItem, ctrl+f for "A list template supports the following view classes:"), however I've been using them previously and they seem to be working as intended.




            • Assignee:
              shossain Shak Hossain
              uzbbert Bert
            • Watchers:
              2 Start watching this issue


              • Created:

                Git Source Code