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

ListItem does not bubble Switch Element

    Details

    • 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

      Description

      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.

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

      • 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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code