Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19417] iOS 9 - Click event handler not firing for multiple nested child elements

GitHub Issuen/a
TypeBug
PriorityNone
StatusReopened
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterRick Blalock
AssigneeUnknown
Created2015-08-27T02:57:13.000+0000
Updated2018-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.

Comments

  1. Rick Blalock 2015-08-27

    Here's a video demonstrating the issue: https://db.tt/ydNm2Sgt
  2. Stephen Feather 2015-08-27

    Is that really the XML you want to be going with there?
  3. Rick Blalock 2015-08-27

    [~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.
  4. Hans Knöchel 2015-09-15

    [~rblalock] Is this issue still open?
  5. Rick Blalock 2015-09-15

    This has fixed itself with the newer builds.
  6. Rick Blalock 2015-09-22

    I see this issue again in master - 5.1.0.v20150922011227

JSON Source