[AC-4820] ListItem does not bubble Switch Element
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2017-02-28T17:02:22.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy |
Labels | alloy, bindings, listitem, switch |
Reporter | Creative |
Assignee | Shak Hossain |
Created | 2017-02-23T13:04:35.000+0000 |
Updated | 2017-02-28T17:02:22.000+0000 |
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.
Update: I managed to do a workaround using {noformat}
Hello, Please share a full sample code that regenerates the behavior without the workaround. If the bug is real we will fix it ASAP. Create a sample code only to demonstrate the issue. Thanks.
Unfortunately I cant spend the 2 hours needed to create a contained testcase. I'm already losing much time on creating workarounds for very basic features
Hello, We need to validate the bug before we can move to fixing.