{ "id": "103545", "key": "ALOY-357", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "14631", "description": "Alloy 0.3.1", "name": "Alloy 0.3.1", "archived": false, "released": true, "releaseDate": "2012-11-02" }, { "id": "14599", "description": "2012 Sprint 22", "name": "2012 Sprint 22", "archived": true, "released": true, "releaseDate": "2012-11-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-11-02T16:34:04.000+0000", "created": "2012-10-17T16:58:02.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "alloy", "button" ], "versions": [], "issuelinks": [ { "id": "22072", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "84243", "key": "AC-3135", "fields": { "summary": "scrollableView fires event \"singletap\" twice", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": null, "updated": "2018-03-07T22:25:45.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "attachment": [ { "id": "32722", "filename": "singletap.tgz", "author": { "name": "mingrobo", "key": "mingrobo", "displayName": "Ming Liu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-17T18:20:39.000+0000", "size": 54281, "mimeType": "application/x-gzip" } ], "flagged": false, "summary": "Button fires event \"singletap\" twice", "creator": { "name": "mingrobo", "key": "mingrobo", "displayName": "Ming Liu", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mingrobo", "key": "mingrobo", "displayName": "Ming Liu", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK 2.1.3.GA\r\niOS 6\r\nalloy 0.2.42", "comment": { "comments": [ { "id": "224008", "author": { "name": "mingrobo", "key": "mingrobo", "displayName": "Ming Liu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "sample code", "updateAuthor": { "name": "mingrobo", "key": "mingrobo", "displayName": "Ming Liu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-17T18:20:39.000+0000", "updated": "2012-10-17T18:20:39.000+0000" }, { "id": "224015", "author": { "name": "mingrobo", "key": "mingrobo", "displayName": "Ming Liu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Seems like changing .on to .addEventListener solves the problem", "updateAuthor": { "name": "mingrobo", "key": "mingrobo", "displayName": "Ming Liu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-17T18:35:26.000+0000", "updated": "2012-10-17T18:35:26.000+0000" }, { "id": "225977", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This ended up being a pretty deep issue. The events firing twice were a symptom of a larger problem in the management of eventing done in order to wrap the Backbone eventing function for Titanium proxies. In short, the event listener only needs to be added to the proxy once, then its handling delegated to any number of handlers in the corresponding backbone listener(s). Listeners were being added to the proxy for _every_ new listener on a particular event added, which has been fixed. Same logic, except in reverse for the off() function as well. We only remove the event listener from the titanium proxy when there are no more listeners in the corresponding Backbone eventing.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-02T16:34:04.000+0000", "updated": "2012-11-02T16:34:04.000+0000" }, { "id": "225980", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Ming: for reference, on() will work as expected when this change is pushed in 0.3.1. No need to use addEventListener() if you don't want. Thanks for taking the time to log this one cause it was actually a very important catch.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-02T16:44:28.000+0000", "updated": "2012-11-02T16:44:28.000+0000" }, { "id": "225981", "author": { "name": "mingrobo", "key": "mingrobo", "displayName": "Ming Liu", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Tony\r\n\r\nThanks for getting this fixed. Looking forward to 0.3.1", "updateAuthor": { "name": "mingrobo", "key": "mingrobo", "displayName": "Ming Liu", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-02T16:55:31.000+0000", "updated": "2012-11-02T16:55:31.000+0000" }, { "id": "225985", "author": { "name": "kabriel", "key": "kabriel", "displayName": "Kabriel Robichaux", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Tony: Thanks for this fix! :)", "updateAuthor": { "name": "kabriel", "key": "kabriel", "displayName": "Kabriel Robichaux", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-02T17:00:03.000+0000", "updated": "2012-11-02T17:00:03.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }