[TIMOB-19417] iOS 9 - Click event handler not firing for multiple nested child elements
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Reopened |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Rick Blalock |
Assignee | Unknown |
Created | 2015-08-27T02:57:13.000+0000 |
Updated | 2018-02-28T19:55:55.000+0000 |
Description
Odd iOS 9 issue.
Setup:
Xcode Beta 6
iOS 9 iPhone 6 sim
Ti SDK 5.0.0.v20150826144420
<View id="gridContainer">
<View id="wrapper">
<View class="section" id="regulationSection">
<View class="cell" id="bag_limit">
<Label bindKey="text" bindValue="bag_limit" class="value" />
<Label class="key">Bag Limit</Label>
</View>
</Label>
</View>
</View>
Won't fire:
$.gridContainer.addEventListener('click', function (e) {});
BUT this event WILL fire if I add event listeners to it's children like so:
$.wrapper.addEventListener('click', function (e) {
console.log(e, e.source, e.source.id);
});
$.regulationSection.addEventListener('click', function (e) {
console.log(e, e.source, e.source.id);
});
$.bag_limit.addEventListener('click', function (e) {
console.log(e, e.source, e.source.id);
});
I remember seeing this happen in previous SDK's long ago. I can't remember what caused it since it was years ago.
Here's a video demonstrating the issue: https://db.tt/ydNm2Sgt
Is that really the XML you want to be going with there?
[~sfeather] I went through several views that I require in and added the structure to the snippet above. The Alloy XML looks a little different because of the requires.
[~rblalock] Is this issue still open?
This has fixed itself with the newer builds.
I see this issue again in master - 5.1.0.v20150922011227